Fixed #36265 -- Added support for serialization of ZoneInfo instances in migrations.

This commit is contained in:
Song Junho 2025-03-29 18:49:12 +09:00 committed by Sarah Boyce
parent 02a5cbfe76
commit 126417be43
4 changed files with 28 additions and 0 deletions

View file

@ -778,6 +778,7 @@ Django can serialize the following:
- ``list``, ``set``, ``tuple``, ``dict``, ``range``.
- ``datetime.date``, ``datetime.time``, and ``datetime.datetime`` instances
(include those that are timezone-aware)
- :class:`zoneinfo.ZoneInfo` instances
- ``decimal.Decimal`` instances
- ``enum.Enum`` and ``enum.Flag`` instances
- ``uuid.UUID`` instances
@ -803,6 +804,10 @@ Django can serialize the following:
- Any class reference (must be in module's top-level scope)
- Anything with a custom ``deconstruct()`` method (:ref:`see below <custom-deconstruct-method>`)
.. versionchanged:: 6.0
Serialization support for :class:`zoneinfo.ZoneInfo` instances was added.
Django cannot serialize:
- Nested classes