diff options
| author | Tim Graham <timograham@gmail.com> | 2014-04-28 08:18:43 -0400 |
|---|---|---|
| committer | Tim Graham <timograham@gmail.com> | 2014-04-28 08:20:26 -0400 |
| commit | 63ae243a13759f2a87184784fa268d6d003c694a (patch) | |
| tree | e7206f506e7d27378efb6218311839d2e45efdb5 /docs/topics | |
| parent | 23f3c53aff54b7f298f29e97042d00dbd9379d00 (diff) | |
[1.7.x] Fixed #22497 -- Highlighted difference between field and class deconstruction.
Thanks nliberg for the suggestion.
Backport of b829d53b37 from master
Diffstat (limited to 'docs/topics')
| -rw-r--r-- | docs/topics/migrations.txt | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/docs/topics/migrations.txt b/docs/topics/migrations.txt index 5afdaf2d72..a53444f568 100644 --- a/docs/topics/migrations.txt +++ b/docs/topics/migrations.txt @@ -502,8 +502,10 @@ Adding a deconstruct() method ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ You can let Django serialize your own custom class instances by giving the class -a ``deconstruct`` method. It takes no arguments, and should return a tuple -of 3 things: ``(path, args, kwargs)``. +a ``deconstruct()`` method. It takes no arguments, and should return a tuple +of three things: ``(path, args, kwargs)``. Note this return value is different +from the ``deconstruct()`` method :ref:`for custom fields +<custom-field-deconstruct-method>` which returns a tuple of four items. ``path`` should be the Python path to the class, with the class name included as the last part (for example, ``myapp.custom_things.MyClass``). If your class is not |
