Merge pull request #87 from alphagov/reordered-config-overrides

Reorderd to override from env over credstash over config
This commit is contained in:
minglis
2016-01-19 15:08:57 +00:00

View File

@@ -75,15 +75,16 @@ def init_csrf(application):
def init_app(app, config_overrides):
for key, value in app.config.items():
if key in os.environ:
app.config[key] = convert_to_boolean(os.environ[key])
if config_overrides:
for key in app.config.keys():
if key in config_overrides:
app.config[key] = config_overrides[key]
for key, value in app.config.items():
if key in os.environ:
app.config[key] = convert_to_boolean(os.environ[key])
@app.context_processor
def inject_global_template_variables():
return {'asset_path': '/static/'}