From 1cae048b1bad1364e0bde6231e8a8bda3cfde237 Mon Sep 17 00:00:00 2001 From: erdgeist Date: Mon, 23 Dec 2024 00:11:54 +0100 Subject: Reintroduce the global app objects, the routes need it --- halfnarp2.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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 from hashlib import sha256 db = SQLAlchemy(app) +app = Flask(__name__) class TalkPreference(db.Model): @@ -267,7 +268,6 @@ if __name__ == "__main__": config["pretalx-url"] + "api/events/" + config["pretalx-conference"] ) - app = Flask(__name__) app.config["SQLALCHEMY_DATABASE_URI"] = config.get( "database-uri", "sqlite:///test.db" ) -- cgit v1.2.3