[Django]-How to call a static methods on a django model class during a south migration

46👍

You can’t use methods from models.py in south migrations. The reason is that in the future models.py will evolve and sooner or later you will delete those methods, then migration will be broken.

You should put all code needed by migration in migration file itself.

7👍

Here’s the pertinent section of the South docs explaining why your methods don’t work:

Rationale behind the serialisation

👤Jason

1👍

Aren’t you using different names lookup_by_name and lookup_name?

👤dzida

Leave a comment