diff options
Diffstat (limited to 'app/auth')
| -rw-r--r-- | app/auth/routes.py | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/app/auth/routes.py b/app/auth/routes.py index 88ff7a0..7f7229e 100644 --- a/app/auth/routes.py +++ b/app/auth/routes.py @@ -30,7 +30,7 @@ def login(): if form.validate_on_submit(): user = User.query.filter_by(username=form.username.data).first() if user is None or not user.check_password(form.password.data): - flash("Invalid username or password", category="error") + flash("Invalid username or password", "error") return redirect(url_for("auth.login")) login_user(user, remember=form.remember_me.data) next_page = request.args.get("next") @@ -56,7 +56,7 @@ def register(): user.set_password(form.password.data) db.session.add(user) db.session.commit() - flash("Thank you, you are now a registered user!") + flash("Thank you, you are now a registered user!", "info") return redirect(url_for("auth.login")) return render_template("auth/register.html", title="Register", form=form) @@ -70,7 +70,10 @@ def reset_password_request(): user = User.query.filter_by(email=form.email.data).first() if user: send_password_reset_email(user) - flash("Check your email for the instructions to reset your password.") + flash( + "Please check your email for the instructions to reset your password.", + "info", + ) return redirect(url_for("auth.login")) return render_template( "auth/reset_password_request.html", title="Reset Password", form=form @@ -88,6 +91,6 @@ def reset_password(token): if form.validate_on_submit(): user.set_password(form.password.data) db.session.commit() - flash("Your password has been reset.") + flash("Your password has been reset.", "info") return redirect(url_for("auth.login")) return render_template("auth/reset_password.html", form=form) |
