summaryrefslogtreecommitdiff
path: root/routes
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 /routes
parent23518a49f95837199036e07deb4a97cad9e871bd (diff)
Move DB stuff inside a class for further refactoring.
Diffstat (limited to 'routes')
-rw-r--r--routes/analyse.py3
-rw-r--r--routes/answer.py3
-rw-r--r--routes/base.py3
-rw-r--r--routes/create.py3
-rw-r--r--routes/question.py3
-rw-r--r--routes/tools.py2
6 files changed, 6 insertions, 11 deletions
diff --git a/routes/analyse.py b/routes/analyse.py
index 3b59ae7..8175d47 100644
--- a/routes/analyse.py
+++ b/routes/analyse.py
@@ -1,7 +1,6 @@
from itertools import combinations
-from app import app
+from app import app, D
from flask import render_template,session,request,redirect
-import db_actions as D
from routes.tools import rows2dicts, get_alert, get_nick, csrf_check
def find_best_and_worst(aid, uid):
diff --git a/routes/answer.py b/routes/answer.py
index e224b44..89b6aa8 100644
--- a/routes/answer.py
+++ b/routes/answer.py
@@ -1,6 +1,5 @@
-from app import app
+from app import app, D
from flask import render_template, session, request, redirect
-import db_actions as D
from routes.tools import rows2dicts, get_alert, get_nick, csrf_check
diff --git a/routes/base.py b/routes/base.py
index 2c4b1f2..d5eae8f 100644
--- a/routes/base.py
+++ b/routes/base.py
@@ -1,7 +1,6 @@
from secrets import token_urlsafe
-from app import app
+from app import app, D
from flask import render_template,session,request,redirect
-import db_actions as D
from routes.tools import rows2dicts, get_alert, get_nick, csrf_check
@app.route("/")
diff --git a/routes/create.py b/routes/create.py
index 2de8e27..af2e25e 100644
--- a/routes/create.py
+++ b/routes/create.py
@@ -1,6 +1,5 @@
-from app import app
+from app import app, D
from flask import render_template,session,request,redirect
-import db_actions as D
from routes.tools import rows2dicts, get_alert, get_nick, generate_link, csrf_check
diff --git a/routes/question.py b/routes/question.py
index 42fce8d..41722d5 100644
--- a/routes/question.py
+++ b/routes/question.py
@@ -1,6 +1,5 @@
-from app import app
+from app import app, D
from flask import render_template,session,request,redirect
-import db_actions as D
from routes.tools import rows2dicts, get_alert, get_nick, csrf_check
@app.route("/pages/question.html")
diff --git a/routes/tools.py b/routes/tools.py
index c55ca74..5f6e141 100644
--- a/routes/tools.py
+++ b/routes/tools.py
@@ -1,6 +1,6 @@
from random import randint
from flask import session, request
-import db_actions as D
+from app import D
def rows2dicts( rows, names ):
dlist=[]