summaryrefslogtreecommitdiff
path: root/app.py
diff options
context:
space:
mode:
authorArvid Koskinen <akoskine@local>2023-12-03 11:34:39 +0200
committerArvid Koskinen <akoskine@local>2023-12-03 11:34:39 +0200
commit14365bb113400e576157be9da384c7bf0d80255c (patch)
tree466ff1def0d5c07baa13dcb40504b5fc456d6683 /app.py
parent23518a49f95837199036e07deb4a97cad9e871bd (diff)
Move DB stuff inside a class for further refactoring.
Diffstat (limited to 'app.py')
-rw-r--r--app.py7
1 files changed, 5 insertions, 2 deletions
diff --git a/app.py b/app.py
index 3d8d5c7..72becc3 100644
--- a/app.py
+++ b/app.py
@@ -1,7 +1,7 @@
from secrets import token_hex
from flask import Flask
from os import getenv
-from db_actions import db
+#from db_actions import db
app = Flask(__name__, static_url_path='')
@@ -15,7 +15,10 @@ if s_key := getenv("SECRET_KEY"):
else:
app.secret_key = token_hex()
-db.init_app(app)
+from db.db import DB
+D = DB()
+
+#db.init_app(app)
import routes.base
import routes.answer