From 03b031ea793e91ce2f87cf28c73cefc8ce69a7b5 Mon Sep 17 00:00:00 2001 From: Lilian Teronen Date: Mon, 27 Nov 2023 01:37:03 +0200 Subject: More rework on routes. Best and worst matches. More visuals. --- routes/question.py | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'routes/question.py') diff --git a/routes/question.py b/routes/question.py index 02261ca..ad31993 100644 --- a/routes/question.py +++ b/routes/question.py @@ -5,7 +5,9 @@ from routes.tools import rows2dicts, get_alert, get_nick @app.route("/pages/question.html") def question(): - return render_template("question.html", + return render_template( + "question.html", + caller="create", alert=get_alert(), nick=get_nick() ) @@ -25,13 +27,13 @@ def new_question(): sid = session["id"] except (KeyError): session["alert"] = "Nimimerkki puuttuukin." - return redirect("/#nick") + return redirect("/#create") try: qid = session["quiz_id"] except (KeyError): session["alert"] = "Kyselmän luonti ei ollutkaan kesken." - return redirect("/#quiz") + return redirect("/#create") for entry in [question, neg_ans, pos_ans]: if len(entry) < 2 or len(entry) > 80: -- cgit v1.2.3