diff options
author | Lilian Teronen <lteronen@local> | 2023-11-27 01:37:03 +0200 |
---|---|---|
committer | Lilian Teronen <lteronen@local> | 2023-11-27 01:37:03 +0200 |
commit | 03b031ea793e91ce2f87cf28c73cefc8ce69a7b5 (patch) | |
tree | 882919559651e1b18904404ccc7c5106d167f1fd /routes/question.py | |
parent | d2de3ae10b6f5314bd4b8243218212d2004f35b0 (diff) |
More rework on routes. Best and worst matches. More visuals.
Diffstat (limited to 'routes/question.py')
-rw-r--r-- | routes/question.py | 8 |
1 files changed, 5 insertions, 3 deletions
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: |