Neue Verwaltung der Gruppenzuordnung 1:n
This commit is contained in:
1 parent
fa02a7ade0
commit
02c017d53d
34 files changed
+1306
-251
No files matched your search
@@ -91,6 +91,11 @@ def create_app(config_name=None):
|
||||
template_folder='../templates',
|
||||
static_folder='../static')
|
||||
app.config.from_object(config[config_name])
|
||||
|
||||
# Anzeigetitel für alle Web-Views. Der interne Projektname bleibt CMBNet.
|
||||
app.jinja_env.globals['APP_TITLE'] = app.config.get(
|
||||
'DISPLAY_TITLE', '20*C+M+B+27'
|
||||
)
|
||||
|
||||
# Middleware registrieren
|
||||
app.wsgi_app = PrefixMiddleware(app.wsgi_app)
|
||||
@@ -104,8 +109,13 @@ def create_app(config_name=None):
|
||||
|
||||
# Datenbank-Setup
|
||||
from cmbnet.db import close_db, init_db_command
|
||||
from cmbnet.db.database import ensure_schema
|
||||
app.teardown_appcontext(close_db)
|
||||
app.cli.add_command(init_db_command)
|
||||
|
||||
# Bestehende Installationen idempotent auf das aktuelle Schema heben.
|
||||
with app.app_context():
|
||||
ensure_schema()
|
||||
|
||||
# Tenant und Account für Requests laden
|
||||
@app.before_request
|
||||
|
||||
Reference in new issue
Block a user