mirror of
https://github.com/django/django.git
synced 2025-06-05 03:29:12 +00:00
[1.10.x] Replaced old DateTimeAwareJSONEncoder with DjangoJSONEncoder in docs.
Backport of d301c61bcb72af864229e51d2ebc6076bea1e5ff from master
This commit is contained in:
parent
a033b351b5
commit
557c1a6a42
@ -373,7 +373,7 @@ including ``datetime`` and ``Decimal`` in JSON backed sessions, you will need
|
|||||||
to write a custom serializer (or convert such values to a JSON serializable
|
to write a custom serializer (or convert such values to a JSON serializable
|
||||||
object before storing them in ``request.session``). While serializing these
|
object before storing them in ``request.session``). While serializing these
|
||||||
values is fairly straightforward
|
values is fairly straightforward
|
||||||
(``django.core.serializers.json.DateTimeAwareJSONEncoder`` may be helpful),
|
(:class:`~django.core.serializers.json.DjangoJSONEncoder` may be helpful),
|
||||||
writing a decoder that can reliably get back the same thing that you put in is
|
writing a decoder that can reliably get back the same thing that you put in is
|
||||||
more fragile. For example, you run the risk of returning a ``datetime`` that
|
more fragile. For example, you run the risk of returning a ``datetime`` that
|
||||||
was actually a string that just happened to be in the same format chosen for
|
was actually a string that just happened to be in the same format chosen for
|
||||||
|
Loading…
x
Reference in New Issue
Block a user