Search code examples
djangodjango-modelsdjango-south

how to write manual south migration for a newly added custom field


**This is my newly added field to my quote model

quote_template = models.CharField(_('Template'), choices=TEMPLATE, max_length=20)

at sudo ../hatsenv/bin/python manage.py schemamigration quote --auto

I am getting this error

! Cannot freeze field 'quote.quote.tags'

! (this field has class tags.managers.PartnerTaggableManager)

! South cannot introspect some fields; this is probably because they are custom

! fields. If they worked in 0.6 or below, this is because we have removed the

! models parser (it often broke things).

! To fix this, read http://south.aeracode.org/wiki/MyFieldsDontWork

how to write manual migration for this one**


Solution

  • Ignore the field at time of migration

    from south.modelsinspector import add_ignored_fields

    add_ignored_fields(["^taggit.managers"])