Hi,

I'm trying to figure out how to implement the "Remember Me" check-box on my login page, oddly enough I haven't managed to find any code snippets for this seemingly common functionality.

It seems to me that right now the only way to change the lifetime of sessions is by changing django.conf.settings.SESSION_EXPIRE_AT_BROWSER_CLOSE, however that affects all users, which is not what I want here. Am I missing some obvious solution to this?

I could probably write a new middleware class to replace SessionMiddleware, with the only difference being the process_response() method that would use a new request.SESSION_EXPIRE_AT_BROWSER_CLOSE setting and if that wasn't set default to using django.conf.setting.SESSION_EXPIRE_AT_BROWSER_CLOSE. That way you could theoretically change the lifetime of an individual session per response without affecting any other sessions. However this seems like the sort of thing that should be handled right out of the box by the current SessionMiddleware.


-+ enlight +-

--~--~---------~--~----~------------~-------~--~----~
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