Confusing return value in
SessionStore('some_session') .get_expiry_date(), example:
from datetime import datetime
from django.contrib.sessions.backends.db import SessionStore
my_session = SessionStore()
my_session.get_expiry_date()
# this return new created sessions expiration time(14 days after datetime.now()) this is expected and logical but:
my_session = SessionStore(
'some_session' )
my_session.get_expiry_date()
# this return new created sessions expiration time too, unexpected, this should return my_session expiration time
Here in this example django force us using my_session._get_session_from_db().expire_date instead my_session.get_expiry_date(), but one simple question: why we should do additional work when we saied to django 'we have specific db session?
In last reply in ticket #32088 i described a bit more.