read the instance/config.py file in IF it exists.

This commit is contained in:
Dan Funk 2020-02-05 13:43:59 -05:00
parent e1e866a2b3
commit ff63978da0
1 changed files with 3 additions and 1 deletions

View File

@ -18,7 +18,9 @@ app.config.from_object('config.default')
if "TESTING" in os.environ and os.environ["TESTING"] == "true":
app.config.from_object('config.testing')
app.config.from_pyfile('testing.py')
else:
# load the instance/config.py, if it exists, when not testing
app.config.from_pyfile('config.py', silent=True)
db = SQLAlchemy(app)
""":type: sqlalchemy.orm.SQLAlchemy"""