From 63ae243a13759f2a87184784fa268d6d003c694a Mon Sep 17 00:00:00 2001 From: Tim Graham Date: Mon, 28 Apr 2014 08:18:43 -0400 Subject: [1.7.x] Fixed #22497 -- Highlighted difference between field and class deconstruction. Thanks nliberg for the suggestion. Backport of b829d53b37 from master --- docs/topics/migrations.txt | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'docs/topics') 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 +` 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 -- cgit v1.3