def end_test(): if not loggedin(): return redirect('/') if not 'attempt_id' in request.form: return redirect(url_for('dashboard')) if request.form.get('finished') == '1': model.save_attempt(request.form['attempt_id']) return redirect(url_for('dashboard'))
def end_test(): if not loggedin(): return redirect("/") if not "attempt_id" in request.form: return redirect(url_for("dashboard")) if request.form.get("finished") == "1": model.save_attempt(request.form["attempt_id"]) return redirect(url_for("dashboard"))
def POST(self): i = web.input() attempt_id = i.attempt_id if i.finished == '1': model.save_attempt(attempt_id) raise web.seeother('../dashboard')