#2548: [patch] Add set/get_expires methods and expires property to sessions
------------------------+---------------------------------------------------
Reporter: Tsume | Owner: adrian
Status: new | Component: Contrib apps
Version: | Resolution:
Keywords: sessions | Stage: Design decision needed
Has_patch: 1 | Needs_docs: 1
Needs_tests: 0 | Needs_better_patch: 1
------------------------+---------------------------------------------------
Comment (by [EMAIL PROTECTED]):
I also want to add something to this subject.
After reading docs and watching code (because the names are not really
obvious, because the session expire time is what's most important), I
think the names 'SESSION_EXPIRE_AT_BROWSER_CLOSE' and 'SESSION_COOKIE_AGE'
are not correctly chosen in Django. Because the session itself does not
and cannot expire if the browser closes, it is the cookie that expires;
also SESSION_COOKIE_AGE is not the age of the cookie, it can be, only if
the cookie does not expire on browser close, but it is actually the
session age, which has nothing to do with the cookie.
I propose 'SESSION_COOKIE_EXPIRE_AT_BROWSER_CLOSE' or
'COOKIE_EXPIRE_AT_BROWSER_CLOSE' and 'SESSION_AGE'.
I know it is a change with that is not backward compatible, but this will
not confuse people and thus prevents problems in the future. Users should
realize that sessions and cookies are 2 different things and the relation
between them.
Maybe it's also possible to have both 'SESSION_AGE' and
'SESSION_COOKIE_AGE'. But then 'SESSION_EXPIRE_AT_BROWSER_CLOSE' will
still confuse people. (I would fine it more streigthforward that my cookie
expires at the moment my session expires than vice versa).
--
Ticket URL: <http://code.djangoproject.com/ticket/2548#comment:11>
Django Code <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
-~----------~----~----~----~------~----~------~--~---