From b48e74f560ae146e4c3585f80775e2e076416bbb Mon Sep 17 00:00:00 2001
From: Patrick Jentsch
Date: Wed, 28 Aug 2019 17:19:08 +0200
Subject: [PATCH] Integrate the possibility to create a minimal app for
auxillary functions.
---
app/__init__.py | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)
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)