why can't I return to login html page?
问题 @app.route('/forgotpasswd/<token>',methods=['GET', 'POST']) def forgot_passwd(token): form = Newpasswd(request.form) password=form.passwd.data if request.method == "POST" and form.validate(): try: email = secret.loads(token, salt='forgotpasswd', max_age=3600) except SignatureExpired: flash("Timeout","danger") return render_template("index.html") finally: cursor=Mysql.connection.cursor() sorgu = "UPDATE users set password='{}' WHERE email= '{}' ".format(password,email) cursor.execute(sorgu)