From 84d1277c408038ab0df6179659c68ac7f08a098f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Aira=20Kyyts=C3=B6nen?= Date: Tue, 12 Dec 2023 01:59:51 +0200 Subject: Changing database variable D to db. Making error and infomessages dissapear. --- routes/question.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'routes/question.py') 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") -- cgit v1.2.3