aboutsummaryrefslogtreecommitdiffstats
path: root/wedding.py
diff options
context:
space:
mode:
authorGuillaume Horel <guillaume.horel@gmail.com>2015-03-27 19:29:20 -0400
committerGuillaume Horel <guillaume.horel@gmail.com>2015-03-27 19:31:56 -0400
commitf0dc2acb76d6d9e5a327ce2fe72c3c4df5d0508c (patch)
tree52cec302b4fd3402a6835e78975240ba4c721d60 /wedding.py
parent56f06b1bbdd20cd8626c43c1779e2845a327ace9 (diff)
downloadwedding-website-f0dc2acb76d6d9e5a327ce2fe72c3c4df5d0508c.tar.gz
add a logout link
Diffstat (limited to 'wedding.py')
-rw-r--r--wedding.py5
1 files changed, 5 insertions, 0 deletions
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: