Search code examples
pythondjangoentity-attribute-valuedjango-south

django-eav and south


I'm starting a new django project and as usually i put south on my installed apps.

Then i need some kind of eav to store some fields in a model and i found an app that does exactly what i want, that is django-eav ( https://github.com/mvpdev/django-eav )

But now i'm facing a problem, because south complains that doesn't know how to work with django-eav.

! Cannot freeze field 'eav.attribute.slug'
! (this field has class eav.fields.EavSlugField)
! Cannot freeze field 'eav.attribute.datatype'
! (this field has class eav.fields.EavDatatypeField)

! 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'm reading this http://south.aeracode.org/docs/customfields.html and i'm trying to solve this problem without giving up any of the two projects.

Anyone could help me? Thanks


Solution

  • The best answer I found was from http://south.aeracode.org/docs/settings.html#setting-south-migration-modules

    It suggests that you set add a SOUTH_MIGRATION_MODULES dict in settings.py, and map that app to a nonexistent module

    SOUTH_MIGRATION_MODULES = {
        'eav': 'ignore',
    }