SESSION_COOKIE_NAME = 'sessionid'         # Cookie name. This can be
whatever you want.
SESSION_COOKIE_AGE = 60 * 60 * 24 * 7 * 2 # Age of cookie, in seconds
(default: 2 weeks).
SESSION_COOKIE_DOMAIN = None              # A string like
".lawrence.com", or None for standard domain cookie.
SESSION_COOKIE_SECURE = False             # Whether the session cookie
should be secure (https:// only).
SESSION_SAVE_EVERY_REQUEST = False        # Whether to save the session
data on every request.
SESSION_EXPIRE_AT_BROWSER_CLOSE = False   # Whether sessions expire when
a user closes his browser.

You can view all other settings in django_root_dir/conf/global_settings.py


Jens Diemer пишет:
> I would like to know the expire date of the current session. I made this:
>
>
> ------------------------------------------------------------------------------
>       from django.contrib.sessions.models import Session
>
>       session_cookie_name = settings.SESSION_COOKIE_NAME
>       current_session_id = self.request.COOKIES[session_cookie_name]
>
>       s = Session.objects.get(pk=current_session_id)
>
>       expiry_date = s.expire_date
> ------------------------------------------------------------------------------
>
>
> There must be a simpler way for this, isn't it?
>
>
>
>
>   

-- 
Artiom Diomin, Development Dep, "Comunicatii Libere" S.R.L.
http://www.asterisksupport.ru
http://www.asterisk-support.com


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