diff options
| author | Guillaume Horel <guillaume.horel@gmail.com> | 2015-03-27 19:29:20 -0400 |
|---|---|---|
| committer | Guillaume Horel <guillaume.horel@gmail.com> | 2015-03-27 19:31:56 -0400 |
| commit | f0dc2acb76d6d9e5a327ce2fe72c3c4df5d0508c (patch) | |
| tree | 52cec302b4fd3402a6835e78975240ba4c721d60 | |
| parent | 56f06b1bbdd20cd8626c43c1779e2845a327ace9 (diff) | |
| download | wedding-website-f0dc2acb76d6d9e5a327ce2fe72c3c4df5d0508c.tar.gz | |
add a logout link
| -rw-r--r-- | templates/layout.html | 1 | ||||
| -rw-r--r-- | wedding.py | 5 |
2 files changed, 6 insertions, 0 deletions
diff --git a/templates/layout.html b/templates/layout.html index 81c136d..f8ac3b9 100644 --- a/templates/layout.html +++ b/templates/layout.html @@ -21,6 +21,7 @@ <li role="presentation" id="getting"><a href="../getting">{{_("Getting There")}}</a></li> <li role="presentation" id="lodging"><a href="../lodging">{{_("Lodging")}}</a></li> <li role="presentation" id="gifts"><a href="../gifts">{{_("Gifts")}}</a></li> + <li role="presentation" id="logout"><a href="../logout">{{_("Logout")}}</a></li> </ul> </div> <div class="col-md-9"> @@ -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: |
