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

Fixed #33916 -- Added support for serialization of enum.Flag in migrations.

This commit is contained in:
Willem Van Onsem
2022-08-11 18:17:19 +02:00
committed by Mariusz Felisiak
parent b30c0081d4
commit 16fffc829c
4 changed files with 29 additions and 4 deletions

View File

@@ -739,7 +739,7 @@ Django can serialize the following:
- ``datetime.date``, ``datetime.time``, and ``datetime.datetime`` instances
(include those that are timezone-aware)
- ``decimal.Decimal`` instances
- ``enum.Enum`` instances
- ``enum.Enum`` and ``enum.Flag`` instances
- ``uuid.UUID`` instances
- :func:`functools.partial` and :class:`functools.partialmethod` instances
which have serializable ``func``, ``args``, and ``keywords`` values.
@@ -756,6 +756,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:: 4.2
Serialization support for ``enum.Flag`` was added.
Django cannot serialize:
- Nested classes