Fixed #25764 -- Added support for serialization of enum.Enum in migrations.

Thanks Tim Graham for the review.
This commit is contained in:
Andrei Fokau 2015-11-16 22:41:46 +01:00 committed by Tim Graham
parent 65764a9316
commit 998894e1b9
6 changed files with 83 additions and 1 deletions

View file

@ -645,6 +645,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
- ``functools.partial`` instances which have serializable ``func``, ``args``,
and ``keywords`` values.
- Any Django field
@ -656,6 +657,10 @@ Django can serialize the following:
Serialization support for `functools.partial` was added.
.. versionchanged:: 1.10
Serialization support for ``enum.Enum`` was added.
Django can serialize the following on Python 3 only:
- Unbound methods used from within the class body (see below)