From f0dc2acb76d6d9e5a327ce2fe72c3c4df5d0508c Mon Sep 17 00:00:00 2001 From: Guillaume Horel Date: Fri, 27 Mar 2015 19:29:20 -0400 Subject: add a logout link --- wedding.py | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'wedding.py') diff --git a/wedding.py b/wedding.py index bb3df7a..14134c2 100644 --- a/wedding.py +++ b/wedding.py @@ -96,6 +96,11 @@ def rsvp(): def main_page(): return render_template("main.html") +@app.route('/logout') +def logout(): + session.clear() + return redirect(url_for('login')) + @app.route('/login/', methods=['GET', 'POST']) def login(): if 'user_name' in session: -- cgit v1.2.3-70-g09d2