mirror of
https://github.com/django/django.git
synced 2025-10-31 09:41:08 +00:00
[1.9.x] Fixed #25807 -- Instructed the migration writer about lazy objects.
Thanks to Trac alias mrgaolei for the report, Baptiste for the confirmation
and Tim for the review.
Backport of cc2ca9c550 from master
This commit is contained in:
@@ -448,7 +448,8 @@ Migrations
|
||||
:djadminopt:`migrate --fake-initial <--fake-initial>` to more easily detect
|
||||
initial migrations.
|
||||
|
||||
* Added support for serialization of ``functools.partial`` objects.
|
||||
* Added support for serialization of ``functools.partial`` and ``LazyObject``
|
||||
instances.
|
||||
|
||||
* When supplying ``None`` as a value in :setting:`MIGRATION_MODULES`, Django
|
||||
will consider the app an app without migrations.
|
||||
|
||||
@@ -659,6 +659,7 @@ Django can serialize the following:
|
||||
- ``decimal.Decimal`` instances
|
||||
- ``functools.partial`` instances which have serializable ``func``, ``args``,
|
||||
and ``keywords`` values.
|
||||
- ``LazyObject`` instances which wrap a serializable value.
|
||||
- Any Django field
|
||||
- Any function or method reference (e.g. ``datetime.datetime.today``) (must be in module's top-level scope)
|
||||
- Any class reference (must be in module's top-level scope)
|
||||
@@ -666,7 +667,8 @@ Django can serialize the following:
|
||||
|
||||
.. versionchanged:: 1.9
|
||||
|
||||
Serialization support for `functools.partial` was added.
|
||||
Serialization support for ``functools.partial`` and ``LazyObject``
|
||||
instances was added.
|
||||
|
||||
Django can serialize the following on Python 3 only:
|
||||
|
||||
|
||||
Reference in New Issue
Block a user