From acc389082bf72db91853bae5ef6f7cfd67cc6f49 Mon Sep 17 00:00:00 2001 From: James Date: Thu, 2 Apr 2015 12:59:55 +0200 Subject: [PATCH] Put things like they were --- app/james.py | 6 +++++- passenger_wsgi.py => app/passenger_wsgi.py | 1 - 2 files changed, 5 insertions(+), 2 deletions(-) rename passenger_wsgi.py => app/passenger_wsgi.py (82%) diff --git a/app/james.py b/app/james.py index 0c536ea..969c95c 100644 --- a/app/james.py +++ b/app/james.py @@ -9,4 +9,8 @@ from forms import * from utils import * from views import * -app.run() +if __name__ == '__main__': + if app.debug: + app.run(host='0.0.0.0', port=80) + else: + app.run() diff --git a/passenger_wsgi.py b/app/passenger_wsgi.py similarity index 82% rename from passenger_wsgi.py rename to app/passenger_wsgi.py index ff8d484..dce231e 100644 --- a/passenger_wsgi.py +++ b/app/passenger_wsgi.py @@ -7,7 +7,6 @@ INTERP = os.path.expanduser("~/env/bin/python") if sys.executable != INTERP: os.execl(INTERP, INTERP, *sys.argv) -sys.path.append(os.path.join(os.getcwd(), "app")) sys.path.append(os.getcwd()) from james import app as application