diff options
| author | Arvid Koskinen <akoskine@local> | 2023-12-03 11:34:39 +0200 |
|---|---|---|
| committer | Arvid Koskinen <akoskine@local> | 2023-12-03 11:34:39 +0200 |
| commit | 14365bb113400e576157be9da384c7bf0d80255c (patch) | |
| tree | 466ff1def0d5c07baa13dcb40504b5fc456d6683 /app.py | |
| parent | 23518a49f95837199036e07deb4a97cad9e871bd (diff) | |
Move DB stuff inside a class for further refactoring.
Diffstat (limited to 'app.py')
| -rw-r--r-- | app.py | 7 |
1 files changed, 5 insertions, 2 deletions
@@ -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 |