summaryrefslogtreecommitdiff
path: root/routes/set/quiz.py
blob: 9ad13da41dcd5d33ca9083cd4dad3786959d29de (plain)
1
2
3
4
5
6
7
8
9
10
11
12
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")