Varud

Socially Proximate Predictions

Flower

Custom Fields on South 0.7

If you’ve upgraded to South 0.7, you’ll notice that custom model fields are no longer supported. There’s a long, convoluted, discussion about supporting custom fields with introspection rules, but that’s unnecessary for most custom fields. If you’re just extending a standard field like CharField, follow their tutorial example. Import:

from south.modelsinspector import add_introspection_rules

in your fields.py file (which should be holding the custom field MyCustomField, in my case in the util app). Then, at the bottom, under your field definition, put:

add_introspection_rules([], ["^util\.fields\.MyCustomField"])

Tags:

Leave a Reply

blog comments powered by Disqus