#9490: Empty session is stored if clean session is accessed
---------------------------------------------------+------------------------
Reporter: hauser | Owner: nobody
Status: closed | Milestone:
Component: django.contrib.sessions | Version: 1.0
Resolution: fixed | Keywords: unused
session modified
Triage Stage: Accepted | Has patch: 0
Needs documentation: 0 | Needs tests: 0
Patch needs improvement: 0 |
---------------------------------------------------+------------------------
Changes (by aaugustin):
* status: new => closed
* resolution: => fixed
Comment:
This is fixed in trunk.
The behavior expected by the OP is enforced in
`django.sessions.middleware`. The `SESSION_SAVE_EVERY_REQUEST` setting
allows to always save the session (the old behavior). I could not find
tests for the new behavior, but that is another problem.
To confirm that the use case of the OP is indeed fixed, I created a Django
project with all the defaults, which means the sessions are stored in the
database table `django_session` and I added this view:
{{{
from django.http import HttpResponse
def test(request):
return HttpResponse('auth: %r' % request.user.is_authenticated()
}}}
Accessing the view does not create a session in the database.
--
Ticket URL: <http://code.djangoproject.com/ticket/9490#comment:2>
Django <http://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.
--
You received this message because you are subscribed to the Google Groups
"Django updates" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/django-updates?hl=en.