app-MAIL-temp/app/auth/views/logout.py

12 lines
260 B
Python
Raw Normal View History

2020-04-27 22:56:44 +02:00
from flask import redirect, url_for, flash
from flask_login import logout_user
from app.auth.base import auth_bp
@auth_bp.route("/logout")
def logout():
logout_user()
2020-04-27 22:56:44 +02:00
flash("You are logged out", "success")
return redirect(url_for("auth.login"))