Fixed #21404 -- Added session.set_expiry() note to 1.6 release notes.
Thanks pwr for the suggestion.
This commit is contained in:
parent
7ad3ab081c
commit
ffdae5b66d
|
@ -807,10 +807,18 @@ For backwards compatibility, this setting defaulted to using :mod:`pickle`
|
||||||
in Django 1.5.3, but we've changed the default to JSON in 1.6. If you upgrade
|
in Django 1.5.3, but we've changed the default to JSON in 1.6. If you upgrade
|
||||||
and switch from pickle to JSON, sessions created before the upgrade will be
|
and switch from pickle to JSON, sessions created before the upgrade will be
|
||||||
lost. While JSON serialization does not support all Python objects like
|
lost. While JSON serialization does not support all Python objects like
|
||||||
:mod:`pickle` does, we highly recommend using JSON-serialized sessions. Also,
|
:mod:`pickle` does, we highly recommend using JSON-serialized sessions. Be
|
||||||
as JSON requires string keys, you will likely run into problems if you are
|
aware of the following when checking your code to determine if JSON
|
||||||
using non-string keys in ``request.session``. See the
|
serialization will work for your application:
|
||||||
:ref:`session_serialization` documentation for more details.
|
|
||||||
|
* JSON requires string keys, so you will likely run into problems if you are
|
||||||
|
using non-string keys in ``request.session``.
|
||||||
|
* Setting session expiration by passing ``datetime`` values to
|
||||||
|
:meth:`~django.contrib.sessions.backends.base.SessionBase.set_expiry` will
|
||||||
|
not work as ``datetime`` values are not serializable in JSON. You can use
|
||||||
|
integer values instead.
|
||||||
|
|
||||||
|
See the :ref:`session_serialization` documentation for more details.
|
||||||
|
|
||||||
Object Relational Mapper changes
|
Object Relational Mapper changes
|
||||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||||
|
|
Loading…
Reference in New Issue