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?




-- 
Mfg.

Jens Diemer


----
A django powered CMS: http://www.pylucid.org


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