Django active sessions

7 views
Skip to first unread message

Alejandro Martin Herve

unread,
Mar 22, 2019, 10:28:35 AM3/22/19
to Django users
Hi, I would like to know if there is a way to detect if a session in no longer active, I'll explain better. I have a setup in my web app where when a user logs in automatically his
session is set to expire at browser close:
 
request.session.set_expiry(0)

But despite this work effectively, the session age time is set to SESSION_COOKIE_AGE by default (2 weeks), my intention is not diminish this value, what I would like to know
is when the session is no longer active because the user close his browser. I already check the Session model code and SessionStore class. I would appreciate the help thanks :)

Reply all
Reply to author
Forward
0 new messages