Re: Missing default callable breaks migration

2015-10-28 Thread Simon Charette
I would add that since migration files are normal Python modules you can simply replace the previously imported callable in the referencing migrations by inlining it. Simon Le mercredi 28 octobre 2015 11:33:28 UTC-4, Tim Graham a écrit : > > Please read > https://docs.djangoproject.com/en/stab

Re: Missing default callable breaks migration

2015-10-28 Thread Tim Graham
Please read https://docs.djangoproject.com/en/stable/topics/migrations/#historical-models In particular, "References to functions in field options such as upload_to and limit_choices_to and model manager declarations with managers having use_in_migrations = True are serialized in migrations, so

Missing default callable breaks migration

2015-10-28 Thread Richard Buck
If I try to change the default on a model field from one callable to another, the migration will fail if the old callable is no longer available. It appears this is because the migration system tries to call the old callable to determine if it returns a different value from the new. I don't th