diff --git a/app/__init__.py b/app/__init__.py index ab8473a0..a5924304 100644 --- a/app/__init__.py +++ b/app/__init__.py @@ -15,12 +15,16 @@ mail = Mail() socketio = SocketIO() -def create_app(config_name): +def create_app(config_name, main=True): app = Flask(__name__) app.config.from_object(config[config_name]) config[config_name].init_app(app) db.init_app(app) + + if not main: + return app + login_manager.init_app(app) mail.init_app(app) # scheduler.init_app(app)