summaryrefslogtreecommitdiff
path: root/routes/set/quiz.py
diff options
context:
space:
mode:
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")