summaryrefslogtreecommitdiff
path: root/routes/set/quiz.py
diff options
context:
space:
mode:
authorSenni Heidari <sheidar2@local>2023-11-21 11:36:12 +0200
committerSenni Heidari <sheidar2@local>2023-11-21 11:36:12 +0200
commitb868d0ba58384fce5a9a45ae153dee9815327d55 (patch)
tree2d73e810cad9eba76121f28b07eeb49bf3f9e573 /routes/set/quiz.py
parent2ebfcf29c84b84999b76ff13150ba5a13fd3cac1 (diff)
Update directory hierarchy
Diffstat (limited to 'routes/set/quiz.py')
-rw-r--r--routes/set/quiz.py13
1 files changed, 13 insertions, 0 deletions
diff --git a/routes/set/quiz.py b/routes/set/quiz.py
new file mode 100644
index 0000000..9ad13da
--- /dev/null
+++ b/routes/set/quiz.py
@@ -0,0 +1,13 @@
+from app import app
+from flask import render_template, session, request, redirect
+import db_actions as D
+
+
+@app.route("/set/quiz",methods=["POST"])
+def new_quiz():
+ if not "id" in session.keys():
+ session["alert"]="Tarvitset nimimerkin loudaksesi"
+ return redirect("/#nick")
+ user_id = session["id"]
+ session["quiz_id"] = D.quiz_new( user_id )
+ return redirect("/#create")