diff options
| author | Teddy Wing | 2015-01-31 19:32:46 -0500 | 
|---|---|---|
| committer | Teddy Wing | 2015-01-31 19:32:46 -0500 | 
| commit | d1e07a1ce6a2c033ffb13d93ce39e84d959771f2 (patch) | |
| tree | 1c9455a043af0ee171f30f3dbf3d8f09e5963f72 /app.py | |
| parent | 0a730ea1962522bf5fb2db41a87ac172dc51750e (diff) | |
| download | edu-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.
Diffstat (limited to 'app.py')
| -rw-r--r-- | app.py | 4 | 
1 files changed, 4 insertions, 0 deletions
| @@ -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(): | 
