Skip to content

Commit

Permalink
[1.7.x] Fixed #23131 -- Documented serialization of callable function…
Browse files Browse the repository at this point in the history
…s in migrations.

Backport of 50ae4b4 from master
  • Loading branch information
timgraham committed Aug 24, 2014
1 parent da2077e commit 8c8ce2e
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions docs/topics/migrations.txt
Expand Up @@ -331,6 +331,10 @@ They will, however, have the same fields, relationships and ``Meta`` options
when you access them in migrations, and you will NOT have any custom
constructors or instance methods. Plan appropriately!

References to functions in field options such as ``upload_to`` and
``limit_choices_to`` are serialized in migrations, so the functions will need
to be kept around for as long as there is a migration referencing them.

In addition, the base classes of the model are just stored as pointers,
so you must always keep base classes around for as long as there is a migration
that contains a reference to them. On the plus side, methods and managers
Expand Down

0 comments on commit 8c8ce2e

Please sign in to comment.