reorder config imports for more specific overrides
This commit is contained in:
@@ -17,12 +17,11 @@ def create_app(instance_path=None, test_config=None):
|
||||
# if it doesn't already exist, create the instance folder
|
||||
os.makedirs(app.instance_path, exist_ok=True)
|
||||
|
||||
if test_config is None:
|
||||
# load defaults from config provided with the application
|
||||
app.config.from_object('incorporealcms.config.Config')
|
||||
# load specific instance configurations
|
||||
app.config.from_pyfile('config.py', silent=True)
|
||||
else:
|
||||
# load defaults from config provided with the application
|
||||
app.config.from_object('incorporealcms.config.Config')
|
||||
# load specific instance configurations
|
||||
app.config.from_pyfile('config.py', silent=True)
|
||||
if test_config:
|
||||
app.config.from_mapping(test_config)
|
||||
|
||||
dictConfig(app.config['LOGGING'])
|
||||
|
||||
Reference in New Issue
Block a user