From dfed18c5ce49c968119e5e395138ec9be8587256 Mon Sep 17 00:00:00 2001 From: Tyler Hallada Date: Sun, 2 Aug 2015 22:31:36 -0400 Subject: [PATCH] Make the haiku-generator part of greater nlp app --- app.py | 10 ++++++++-- buzzfeed-haiku-generator.wsgi => nlp.wsgi | 0 .../{index.html => buzzfeed-haiku-generator.html} | 0 3 files changed, 8 insertions(+), 2 deletions(-) rename buzzfeed-haiku-generator.wsgi => nlp.wsgi (100%) rename templates/{index.html => buzzfeed-haiku-generator.html} (100%) diff --git a/app.py b/app.py index de8e432..a4ee704 100644 --- a/app.py +++ b/app.py @@ -1,13 +1,19 @@ -from flask import Flask, render_template +from flask import Flask, render_template, redirect from generate_poem import PoemGenerator app = Flask(__name__) generator = PoemGenerator(None) + @app.route("/") def home(): + return redirect('http://git.hallada.net/nlp/') + + +@app.route("/buzzfeed-haiku-generator") +def buzzfeed_haiku_generator(): haiku = generator.generate_haiku() - return render_template('index.html', haiku=haiku) + return render_template('buzzfeed-haiku-generator.html', haiku=haiku) if __name__ == '__main__': app.run(debug=True) diff --git a/buzzfeed-haiku-generator.wsgi b/nlp.wsgi similarity index 100% rename from buzzfeed-haiku-generator.wsgi rename to nlp.wsgi diff --git a/templates/index.html b/templates/buzzfeed-haiku-generator.html similarity index 100% rename from templates/index.html rename to templates/buzzfeed-haiku-generator.html