mirror of
https://github.com/sartography/cr-connect-workflow.git
synced 2025-02-23 05:08:32 +00:00
read the instance/config.py file in IF it exists.
This commit is contained in:
parent
e1e866a2b3
commit
ff63978da0
@ -18,7 +18,9 @@ app.config.from_object('config.default')
|
|||||||
if "TESTING" in os.environ and os.environ["TESTING"] == "true":
|
if "TESTING" in os.environ and os.environ["TESTING"] == "true":
|
||||||
app.config.from_object('config.testing')
|
app.config.from_object('config.testing')
|
||||||
app.config.from_pyfile('testing.py')
|
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)
|
db = SQLAlchemy(app)
|
||||||
""":type: sqlalchemy.orm.SQLAlchemy"""
|
""":type: sqlalchemy.orm.SQLAlchemy"""
|
||||||
|
Loading…
x
Reference in New Issue
Block a user