hearsaycorp/django-richenum — pull request #16 by bennylope (2013-09-10 14:56:05+00:00)
Title: Adds introspection rules for South

[South](https://pypi.python.org/pypi/South) reports an error when creating schema migrations using the richenum fields.

! Cannot freeze field 'myapp.mymodel.index_enum_field'
! (this field has class django_richenum.models.fields.IndexEnumField)
! Cannot freeze field 'myapp.mymodel.lax_index_enum_field'
! (this field has class django_richenum.models.fields.LaxIndexEnumField)
! Cannot freeze field 'myapp.mymodel.canonical_enum_field'
! (this field has class django_richenum.models.fields.CanonicalNameEnumField)

! 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

Adding the [introspection rules](http://south.readthedocs.org/en/latest/customfields.html#extending-introspection) allows South to generate the schema.

The ruleset is conditionally blocked off for those not using South.