1
0
mirror of https://github.com/django/django.git synced 2025-10-31 09:41:08 +00:00

Fixed #26656 -- Added duration (timedelta) support to DjangoJSONEncoder.

This commit is contained in:
Will Hardy
2016-05-26 14:48:36 +02:00
committed by Tim Graham
parent a7b5dfd170
commit 8ef78b8165
7 changed files with 93 additions and 5 deletions

View File

@@ -223,6 +223,10 @@ Serialization
can now be customized by passing a ``cls`` keyword argument to the
``serializers.serialize()`` function.
* :class:`~django.core.serializers.json.DjangoJSONEncoder` now serializes
:class:`~datetime.timedelta` objects (used by
:class:`~django.db.models.DurationField`).
Signals
~~~~~~~