From e17d2f4a394e53f323e39804447f864dee7778b7 Mon Sep 17 00:00:00 2001 From: Michael Sproul Date: Fri, 14 Feb 2014 09:15:37 +1100 Subject: [PATCH] WSGI modifications. --- bullshit.wsgi | 3 +++ bullshit/webapp/__init__.py | 2 ++ bullshit/webapp/webapp.py | 4 ++-- 3 files changed, 7 insertions(+), 2 deletions(-) create mode 100644 bullshit.wsgi diff --git a/bullshit.wsgi b/bullshit.wsgi new file mode 100644 index 0000000..995299b --- /dev/null +++ b/bullshit.wsgi @@ -0,0 +1,3 @@ +import sys +sys.path.insert(0, '/home/michael/bullshit') +from bullshit.webapp import app as application diff --git a/bullshit/webapp/__init__.py b/bullshit/webapp/__init__.py index e69de29..b571b84 100644 --- a/bullshit/webapp/__init__.py +++ b/bullshit/webapp/__init__.py @@ -0,0 +1,2 @@ +from .webapp import app +__all__ = ["app"] diff --git a/bullshit/webapp/webapp.py b/bullshit/webapp/webapp.py index 882e9bc..cc67a0a 100644 --- a/bullshit/webapp/webapp.py +++ b/bullshit/webapp/webapp.py @@ -3,11 +3,11 @@ app = Flask(__name__) -@app.route("/horoscope/") +@app.route("/") def get_horoscope(): return render_template("horoscope.html", horoscope=horoscope.generate()) -@app.route("/horoscope/dirty/") +@app.route("/dirty/") def get_dirty_horoscope(): return render_template("horoscope.html", horoscope=horoscope.generate(dirty=True))