hearsaycorp / django-livefield

Convenient soft-deletion for Django models.
MIT License
35 stars 19 forks source link

South cannot introspect live field #22

Closed grantmcconnaughey closed 8 years ago

grantmcconnaughey commented 9 years ago

I am using South 0.8.4 in a Django 1.6.10 project. I have the most recent version of django-livefield, with the LiveField added to one of my models. When I try to run a schemamigration I receive this error:

(sidekick)sidekick $ ./manage.py schemamigration agency --auto
 ! Cannot freeze field 'agency.agency.live'
 ! (this field has class livefield.fields.LiveField)

 ! 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

I noticed the fields.py module has the following lines:

from south.modelsinspector import add_introspection_rules
add_introspection_rules([], ['^livefield.LiveField'])

yet the error is still occurring.

grantmcconnaughey commented 9 years ago

The South Docs for custom fields suggest that this is what the syntax looks like:

add_introspection_rules([], ["^myapp\.stuff\.fields\.SomeNewField"])

So maybe in django-livefield the syntax should be:

add_introspection_rules([], ['^livefield\.fields\.LiveField'])