From 26a094469b2c6b7672fd940a50d9d4fda599f18e Mon Sep 17 00:00:00 2001 From: Son NK <> Date: Mon, 27 Apr 2020 22:56:44 +0200 Subject: [PATCH] remove logout.html --- app/auth/templates/auth/logout.html | 28 ---------------------------- app/auth/views/logout.py | 5 +++-- 2 files changed, 3 insertions(+), 30 deletions(-) delete mode 100644 app/auth/templates/auth/logout.html diff --git a/app/auth/templates/auth/logout.html b/app/auth/templates/auth/logout.html deleted file mode 100644 index 2eeecd3e..00000000 --- a/app/auth/templates/auth/logout.html +++ /dev/null @@ -1,28 +0,0 @@ -{% extends "base.html" %} - -{% block content %} -
-{% endblock %} - - -{% block title %} - Logout -{% endblock %} diff --git a/app/auth/views/logout.py b/app/auth/views/logout.py index 56ac7e39..d6b2f559 100644 --- a/app/auth/views/logout.py +++ b/app/auth/views/logout.py @@ -1,4 +1,4 @@ -from flask import render_template +from flask import redirect, url_for, flash from flask_login import logout_user from app.auth.base import auth_bp @@ -7,4 +7,5 @@ from app.auth.base import auth_bp @auth_bp.route("/logout") def logout(): logout_user() - return render_template("auth/logout.html") + flash("You are logged out", "success") + return redirect(url_for("auth.login"))