summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTeddy Wing2015-01-31 19:32:46 -0500
committerTeddy Wing2015-01-31 19:32:46 -0500
commitd1e07a1ce6a2c033ffb13d93ce39e84d959771f2 (patch)
tree1c9455a043af0ee171f30f3dbf3d8f09e5963f72
parent0a730ea1962522bf5fb2db41a87ac172dc51750e (diff)
downloadedu-net-d1e07a1ce6a2c033ffb13d93ce39e84d959771f2.tar.bz2
app.py: Add debug config
If we don't have an app environment variable set, assume we're in the development environment and set debug=True.
-rw-r--r--app.py4
1 files changed, 4 insertions, 0 deletions
diff --git a/app.py b/app.py
index bea83f3..509ddcb 100644
--- a/app.py
+++ b/app.py
@@ -1,3 +1,5 @@
+import os
+
from flask import Flask
from flask_user import SQLAlchemyAdapter, UserManager
@@ -11,6 +13,8 @@ app = Flask(__name__)
app.config['SQLALCHEMY_DATABASE_URI'] = 'sqlite:///development.db'
app.config['SECRET_KEY'] = 'this should definitely be changed to an ' \
'environment variable'
+if not os.environ.get('EDU_APP_ENV'):
+ app.debug = True
db.init_app(app)
with app.app_context():