summaryrefslogtreecommitdiff
path: root/routes/question.py
diff options
context:
space:
mode:
authorAira Kyytsönen <akyytson@local>2023-12-12 01:59:51 +0200
committerAira Kyytsönen <akyytson@local>2023-12-12 01:59:51 +0200
commit84d1277c408038ab0df6179659c68ac7f08a098f (patch)
tree8a6f374e9810198a8559d8a236f8179c909c1fe7 /routes/question.py
parent3dc9e71b7c733e7fe6fe9e226ad363f84a2e1dee (diff)
Changing database variable D to db. Making error and infomessages dissapear.
Diffstat (limited to 'routes/question.py')
-rw-r--r--routes/question.py8
1 files changed, 4 insertions, 4 deletions
diff --git a/routes/question.py b/routes/question.py
index a56c0db..b9c45c8 100644
--- a/routes/question.py
+++ b/routes/question.py
@@ -1,4 +1,4 @@
-from app import app, D
+from app import app, db
from flask import render_template,session,request,redirect
from routes.tools import rows2dicts, get_alert, get_nick, csrf_check
@@ -45,8 +45,8 @@ def new_question():
session["alert"] = "Vastauksessasi on nyt jotain häikkää."
return redirect("/#question")
- question_id = D.question.new( question, neg_ans, pos_ans )
- D.quiz.add(qid, question_id)
- D.answer.new(sid, question_id, answer)
+ question_id = db.question.new( question, neg_ans, pos_ans )
+ db.quiz.add(qid, question_id)
+ db.answer.new(sid, question_id, answer)
return redirect("/#create")