Integrated credstash as a live properties setting in the app.py class

- initial versions kept it out of this class but updated as lots of duplication and errors as config
set up in multiple places and not all picking up credstash.
This commit is contained in:
Martyn Inglis
2016-01-11 09:32:49 +00:00
parent 63c87f10e7
commit ba4dac051b
3 changed files with 10 additions and 21 deletions

4
db.py
View File

@@ -1,5 +1,3 @@
from app import create_app
import os
from credstash import getAllSecrets
from flask.ext.script import Manager, Server
from flask_migrate import Migrate, MigrateCommand
@@ -7,7 +5,7 @@ from app import create_app, db
secrets = getAllSecrets(region="eu-west-1")
application = create_app(os.getenv('NOTIFICATIONS_ADMIN_ENVIRONMENT') or 'live')
application = create_app('live')
for key in application.config.keys():
if key in secrets: