You can't change session lifetime on the fly with the default 
SessionMiddleware, but you can write your own middleware that's more 
flexible. I just wrote up my solution on the wiki here: 
http://code.djangoproject.com/wiki/CookBookDualSessionMiddleware

-+ enlight +-

Rob Hudson wrote:
> It would be interesting to know, however, how to make this work like
> this:
> 
> Default case: when the user doesn't check the "remember me" box...
> - Remove the cookie on browser close.  This is great for sites that
> might get used in public places like libraries.
> - You can do this with: settings.SESSION_EXPIRE_AT_BROWSER_CLOSE = True
> 
> Remember me case:
> - Keep the cookie between browser sessions.
> - This is the default in Django with
> settings.SESSION_EXPIRE_AT_BROWSER_CLOSE = False
> 
> But can you change this on the fly depending on a user request?
> 


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-users@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to