From 14365bb113400e576157be9da384c7bf0d80255c Mon Sep 17 00:00:00 2001 From: Arvid Koskinen Date: Sun, 3 Dec 2023 11:34:39 +0200 Subject: Move DB stuff inside a class for further refactoring. --- app.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'app.py') 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 -- cgit v1.2.3