I'm switching my web site to Django from another content management system and I'm having trouble importing the HTML to Django using fixtures, specifically with "Events", which is a model in my Django app. The model is as follows:
class Event(models.Model):
event_name = models.CharField(max_length=100)
event_date = models.DateTimeField()
event_city = models.CharField(max_length=100)
event_province = models.CharField(max_length=100)
event_location = models.CharField(max_length=100, blank=True)
event_details = models.TextField(blank=True)
event_details
is HTML containing the details for the specified event. When importing the data using syncdb I receive a DeserializationError: Problem installing fixture 'events.json': Invalid control character at: line 274 column 73 (char 7090)
Here is an example of the json that I'm trying to import:
{
"model": "events.Event",
"pk": 26,
"fields": {
"event_name": "Random Event",
"event_date": "2008-09-06 00:00:00+00:00",
"event_city": "Toronto",
"event_province": "ON",
"additional_info": { "data": "Promoter: Random Person Productions<BR>
Contact: John Doe: (555) 555-7777<BR>
Promoter Website: <A HREF="http://www.foo.com">www.foo.com</A>" }
}
},
The error occurs after the first BR on the first line of the "additional_info". What am I doing wrong?
Regards.