Question

I use django-taggit-autocomplete, but when doing a schememigrating, I got an error

 ! Cannot freeze field 'main.hotels.tags'
 ! (this field has class taggit_autocomplete_modified.managers.TaggableManagerAutocomplete)
 ! Cannot freeze field 'main.rooms.tags'
 ! (this field has class taggit_autocomplete_modified.managers.TaggableManagerAutocomplete)

 ! 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

So I search a little bit and found django-taggit-autocomplete-modified, which should solve the problem, but it doesn't.

What is the best way how to workaround it?

Was it helpful?

Solution

Finally I have solved the problem adding following code to models.py

from south.modelsinspector import add_ignored_fields
add_ignored_fields(["^taggit_autocomplete\.managers"])

OTHER TIPS

Here's some context to @Douglish's own answer - taken from South's documentation:

you can ignore some fields completely if you know they’re not needed. For example, django-taggit has a manager that actually shows up as a fake field (this makes the API for using it much nicer, but confuses South to no end). The django-taggit module we ship with contains this rule to ignore it:

from south.modelsinspector import add_ignored_fields
add_ignored_fields(["^taggit\.managers"])
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top