if usernamedata is None:
flash("No user named like this", "danger")
return render_template("login/login.html")
else:
for passwor_data in passwordata:
if sha256_crypt.verify(password, passwor_data):
flash("You are logged in", "success")
return redirect(url_for('logged'))
else:
flash("dfgj", "danger")
return render_template("logged_home/home.html")
return render_template("login/login.html")
重定向不起作用。我尝试了多次,但是没有用。它仍然给了我login.html