summaryrefslogtreecommitdiff
path: root/docs
diff options
context:
space:
mode:
authorWillem Van Onsem <vanonsem.willem@gmail.com>2022-08-11 18:17:19 +0200
committerMariusz Felisiak <felisiak.mariusz@gmail.com>2022-08-25 06:43:48 +0200
commit16fffc829cbcb231b7276d7e1d0bb836a515873b (patch)
treec8c2957cfd059025c2802aa33b8580370ba59195 /docs
parentb30c0081d4d8a31ab7dc7f72a4c7099af606ef29 (diff)
Fixed #33916 -- Added support for serialization of enum.Flag in migrations.
Diffstat (limited to 'docs')
-rw-r--r--docs/releases/4.2.txt2
-rw-r--r--docs/topics/migrations.txt6
2 files changed, 6 insertions, 2 deletions
diff --git a/docs/releases/4.2.txt b/docs/releases/4.2.txt
index d7e40f600b..e4961fba2f 100644
--- a/docs/releases/4.2.txt
+++ b/docs/releases/4.2.txt
@@ -192,7 +192,7 @@ Management Commands
Migrations
~~~~~~~~~~
-* ...
+* Migrations now support serialization of ``enum.Flag`` objects.
Models
~~~~~~
diff --git a/docs/topics/migrations.txt b/docs/topics/migrations.txt
index cf3451a782..e67e074886 100644
--- a/docs/topics/migrations.txt
+++ b/docs/topics/migrations.txt
@@ -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