Logout button

This commit is contained in:
Simon
2018-06-08 11:48:11 -04:00
parent dc0cde61a0
commit 20d0f97ffb
2 changed files with 8 additions and 1 deletions

7
app.py
View File

@@ -220,6 +220,13 @@ def admin_login():
return redirect("/admin")
@app.route("/logout")
def admin_logout():
session.clear()
flash("Logged out", "info")
return redirect("/")
@app.route("/dashboard")
def admin_dashboard():
if "username" in session: