diff options
author | erdgeist <erdgeist@erdgeist.org> | 2024-12-23 00:11:54 +0100 |
---|---|---|
committer | erdgeist <erdgeist@erdgeist.org> | 2024-12-23 00:11:54 +0100 |
commit | 1cae048b1bad1364e0bde6231e8a8bda3cfde237 (patch) | |
tree | 40b0278e8d42e1ba8c287ce54988fb4f031fa70d | |
parent | 4182581f3d540d0a3c95d212c120e2080d18f7cd (diff) |
Reintroduce the global app objects, the routes need it
-rwxr-xr-x | halfnarp2.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/halfnarp2.py b/halfnarp2.py index 5451411..8d736a0 100755 --- a/halfnarp2.py +++ b/halfnarp2.py | |||
@@ -13,6 +13,7 @@ from html_sanitizer import Sanitizer | |||
13 | from hashlib import sha256 | 13 | from hashlib import sha256 |
14 | 14 | ||
15 | db = SQLAlchemy(app) | 15 | db = SQLAlchemy(app) |
16 | app = Flask(__name__) | ||
16 | 17 | ||
17 | 18 | ||
18 | class TalkPreference(db.Model): | 19 | class TalkPreference(db.Model): |
@@ -267,7 +268,6 @@ if __name__ == "__main__": | |||
267 | config["pretalx-url"] + "api/events/" + config["pretalx-conference"] | 268 | config["pretalx-url"] + "api/events/" + config["pretalx-conference"] |
268 | ) | 269 | ) |
269 | 270 | ||
270 | app = Flask(__name__) | ||
271 | app.config["SQLALCHEMY_DATABASE_URI"] = config.get( | 271 | app.config["SQLALCHEMY_DATABASE_URI"] = config.get( |
272 | "database-uri", "sqlite:///test.db" | 272 | "database-uri", "sqlite:///test.db" |
273 | ) | 273 | ) |