diff --git a/flaskr/__init__.py b/flaskr/__init__.py index 7f5869b..efa74c8 100644 --- a/flaskr/__init__.py +++ b/flaskr/__init__.py @@ -12,9 +12,6 @@ def create_app(test_config=None): NAME='Flaskr' ) - if app.config.get('STATIC_FOLDER') is not None: - app.static_folder = app.config.get('STATIC_FOLDER') - app.wsgi_app = ProxyFix( app.wsgi_app, x_for=1, x_proto=1, x_host=1, x_prefix=1 ) @@ -26,6 +23,9 @@ def create_app(test_config=None): # load the test config if passed in app.config.from_mapping(test_config) + if app.config.get('STATIC_FOLDER') is not None: + app.static_folder = app.config.get('STATIC_FOLDER') + # ensure the instance folder exists try: os.makedirs(app.instance_path)