summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorerdgeist <erdgeist@erdgeist.org>2024-12-23 00:11:54 +0100
committererdgeist <erdgeist@erdgeist.org>2024-12-23 00:11:54 +0100
commit1cae048b1bad1364e0bde6231e8a8bda3cfde237 (patch)
tree40b0278e8d42e1ba8c287ce54988fb4f031fa70d
parent4182581f3d540d0a3c95d212c120e2080d18f7cd (diff)
Reintroduce the global app objects, the routes need it
-rwxr-xr-xhalfnarp2.py2
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
13from hashlib import sha256 13from hashlib import sha256
14 14
15db = SQLAlchemy(app) 15db = SQLAlchemy(app)
16app = Flask(__name__)
16 17
17 18
18class TalkPreference(db.Model): 19class 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 )