aboutsummaryrefslogtreecommitdiff
path: root/pyaggr3g470r/views.py
diff options
context:
space:
mode:
authorCédric Bonhomme <cedric@cedricbonhomme.org>2014-06-18 09:49:59 +0200
committerCédric Bonhomme <cedric@cedricbonhomme.org>2014-06-18 09:49:59 +0200
commit7ea2cf120f3a016da7d14eac7eca475c796e6312 (patch)
tree505d3a03bb70fc5aaec0d8182069236c68eabaaa /pyaggr3g470r/views.py
parentUpdated French translations. (diff)
downloadnewspipe-7ea2cf120f3a016da7d14eac7eca475c796e6312.tar.gz
newspipe-7ea2cf120f3a016da7d14eac7eca475c796e6312.tar.bz2
newspipe-7ea2cf120f3a016da7d14eac7eca475c796e6312.zip
Testing a REST API.
Diffstat (limited to 'pyaggr3g470r/views.py')
-rw-r--r--pyaggr3g470r/views.py4
1 files changed, 3 insertions, 1 deletions
diff --git a/pyaggr3g470r/views.py b/pyaggr3g470r/views.py
index daf1d84e..25717dce 100644
--- a/pyaggr3g470r/views.py
+++ b/pyaggr3g470r/views.py
@@ -151,18 +151,20 @@ def login():
user = User.query.filter(User.email == form.email.data).first()
login_user(user)
g.user = user
+ session['email'] = form.email.data
identity_changed.send(current_app._get_current_object(), identity=Identity(user.id))
flash(gettext("Logged in successfully."), 'success')
return redirect(url_for('home'))
return render_template('login.html', form=form)
-
@app.route('/logout/')
@login_required
def logout():
"""
Log out view. Removes the user information from the session.
"""
+ session.pop('email', None)
+
# Remove the user information from the session
logout_user()
bgstack15