Hi,
My app is using a custom field that subclasses the JSONField provided by this project:
Unfortunately for reasons beyond my experience, when south does a data-migration with this simple rule setup:
from south.modelsinspector import add_introspection_rules
add_introspection_rules([], ["^top\.modelfields\.DescriptionField"])
The json data is escaped inappropriately. I think this is to do with the JSONField implementation and how it figures out when to encode & decode the json data.
I have found a work around which is to generate the migration script and then edit the field entries like so:
- 'description': ('top.modelfields.DescriptionField', [], {'default': '[]', 'blank': 'True'}),
+ # Tell south that the description field is actually just a text field
+ 'description': ('django.db.models.fields.TextField', [], {'default': '[]', 'blank': 'True'}),
Unfortunately, whilst this works, I have to remember to do and as a recent experience as proven, I don't always do that.
Is there a way I can tell South to treat the field as a TextField for these migrations? Or would there be a better way to approach the situation? Ideally the JSONField implementation would be fixed, but I don't understand how to do that currently.
Any help would be much appreciated,
Michael