mirror of
https://gitlab.ub.uni-bielefeld.de/sfb1288inf/nopaque.git
synced 2024-12-25 02:44:18 +00:00
Integrate the possibility to create a minimal app for auxillary functions.
This commit is contained in:
parent
e5ea98510e
commit
b48e74f560
@ -15,12 +15,16 @@ mail = Mail()
|
|||||||
socketio = SocketIO()
|
socketio = SocketIO()
|
||||||
|
|
||||||
|
|
||||||
def create_app(config_name):
|
def create_app(config_name, main=True):
|
||||||
app = Flask(__name__)
|
app = Flask(__name__)
|
||||||
app.config.from_object(config[config_name])
|
app.config.from_object(config[config_name])
|
||||||
|
|
||||||
config[config_name].init_app(app)
|
config[config_name].init_app(app)
|
||||||
db.init_app(app)
|
db.init_app(app)
|
||||||
|
|
||||||
|
if not main:
|
||||||
|
return app
|
||||||
|
|
||||||
login_manager.init_app(app)
|
login_manager.init_app(app)
|
||||||
mail.init_app(app)
|
mail.init_app(app)
|
||||||
# scheduler.init_app(app)
|
# scheduler.init_app(app)
|
||||||
|
Loading…
Reference in New Issue
Block a user