Hey friends!
Using Django 1.7, how can the user perform a migration operation (say,
AddField) on an app other than the app in which the migration lives?
Here's the use case:
Mezzanine lets you inject fields on its own stock models using the
EXTRA_MODEL_FIELDS setting.
However, as the Mezzanine docs point out
(http://mezzanine.jupo.org/docs/model-customization.html#field-injection-caveats),
there are some "caveats" regarding migrations.
Specifically, the migrations need to be placed in a local app even
though they're applied to the Mezzanine models.
What's the proper way to do this in Django 1.7?
It's easy to do it with a monkeypatch. Here's an example:
https://gist.github.com/jMyles/130050563ba96a7d7cc8
--
Peace and Persistence
jMyles
--
You received this message because you are subscribed to the Google Groups "Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to django-users+unsubscribe@googlegroups.com.
To post to this group, send email to django-users@googlegroups.com.
Visit this group at http://groups.google.com/group/django-users.
To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/CAMGywB5VPrNdEQSXxdrLV%2BivMZJeAM7Xm3QHnoexcU_zXw767A%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment