ripasso-cursive: cosmetic changes (#361736)
[NixPkgs.git] / pkgs / by-name / po / powerdns-admin / 0006-Register-modules-before-starting.patch
blobdd552cc28403d508ce140a7a0f5d565511e176fe
1 From 86dcc9f308d2ca65704953f1ff9fe043d743e536 Mon Sep 17 00:00:00 2001
2 From: Flakebi <flakebi@t-online.de>
3 Date: Sat, 2 Dec 2023 16:33:45 +0100
4 Subject: [PATCH 6/6] Register modules before starting
6 Fixes flask 2.3: 'Blueprint' object has no attribute 'before_app_first_request'
7 ---
8 run.py | 3 +++
9 1 file changed, 3 insertions(+)
11 diff --git a/run.py b/run.py
12 index 5ffcde3..52e719d 100755
13 --- a/run.py
14 +++ b/run.py
15 @@ -1,6 +1,9 @@
16 #!/usr/bin/env python3
17 from powerdnsadmin import create_app
18 +from .powerdnsadmin.routes.index import register_modules
20 if __name__ == '__main__':
21 app = create_app()
22 + with app.app_context():
23 + register_modules()
24 app.run(debug=True, host=app.config.get('BIND_ADDRESS', '127.0.0.1'), port=app.config.get('PORT', '9191'))
25 --
26 2.42.0