aboutsummaryrefslogtreecommitdiffstats
path: root/mediagoblin/auth/views.py
diff options
context:
space:
mode:
authorJakob Kramer <jakob.kramer@gmx.de>2013-05-22 14:51:12 +0200
committerRodney Ewing <ewing.rj@gmail.com>2013-07-11 14:56:40 -0700
commitef57b0622c06d2b169cbe28f5e9f38ebf569badb (patch)
tree130c32d267c37f176a3f0dc440833fe109d07650 /mediagoblin/auth/views.py
parent527b7e3b57906a86dae914daae0399b04b3b5388 (diff)
downloadmediagoblin-ef57b0622c06d2b169cbe28f5e9f38ebf569badb.tar.lz
mediagoblin-ef57b0622c06d2b169cbe28f5e9f38ebf569badb.tar.xz
mediagoblin-ef57b0622c06d2b169cbe28f5e9f38ebf569badb.zip
save “stay_logged_in” in the session
Since sessions are rebuilt, e.g. when you try to post a blank comment and therefore receive an error message, the session will be overwritten without the old max_age.
Diffstat (limited to 'mediagoblin/auth/views.py')
-rw-r--r--mediagoblin/auth/views.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/mediagoblin/auth/views.py b/mediagoblin/auth/views.py
index d276a074..d54762b0 100644
--- a/mediagoblin/auth/views.py
+++ b/mediagoblin/auth/views.py
@@ -89,7 +89,7 @@ def login(request):
if user:
# set up login in session
if login_form.stay_logged_in.data:
- request.session.max_age = 30 * 24 * 60 * 60
+ request.session['stay_logged_in'] = True
request.session['user_id'] = unicode(user.id)
request.session.save()