Fixed #28763 -- Allowed overriding the session cookie age with SessionStore.get_session_cookie_age().

This commit is contained in:
Hasan Ramezani 2019-05-19 22:15:45 +02:00 committed by Mariusz Felisiak
parent df28ebd6c8
commit 9d6f981a66
7 changed files with 32 additions and 6 deletions

View file

@ -96,7 +96,9 @@ Minor features
:mod:`django.contrib.sessions`
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
* ...
* The new
:meth:`~django.contrib.sessions.backends.base.SessionBase.get_session_cookie_age()`
methods allows dynamically specifying the session cookie age.
:mod:`django.contrib.sitemaps`
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

View file

@ -244,6 +244,13 @@ You can edit it multiple times.
Deletes the test cookie. Use this to clean up after yourself.
.. method:: get_session_cookie_age()
.. versionadded:: 3.0
Returns the age of session cookies, in seconds. Defaults to
:setting:`SESSION_COOKIE_AGE`.
.. method:: set_expiry(value)
Sets the expiration time for the session. You can pass a number of