Setting ENV to live and read config on non-dev environments from a file.

This commit is contained in:
Martyn Inglis
2015-12-07 11:30:29 +00:00
parent 4bb25dfdb1
commit 66537fca30
4 changed files with 9 additions and 6 deletions

View File

@@ -24,6 +24,8 @@ def create_app(config_name):
application.config['NOTIFY_API_ENVIRONMENT'] = config_name
application.config.from_object(configs[config_name])
if config_name is not 'development':
application.config.from_envvar('FLASK_CONFIG')
db.init_app(application)
init_app(application)
init_csrf(application)