I'm running into an error using South migrations on Django. I've included a couple of new fields in my model. I can run python manage.py syncdb
and python manage.py schemamigrations retailers
but when I try to migrate I run into...
FATAL ERROR - The following SQL query failed: CREATE TABLE "retailers_tag" ("id" integer NOT NULL PRIMARY KEY, "name" varchar(100) NOT NULL, "slug" varchar(50) NOT NULL UNIQUE)
The error was: table "retailers_tag" already exists
ValueError: Cannot import the required field 'autoslug.fields.AutoSlugField'
My model is below:
from django.db import models
from django_extensions.db.fields import AutoSlugField
class Tag(models.Model):
tag = models.CharField(max_length=100)
slug = AutoSlugField(populate_from='name', unique=True)
def __unicode__(self):
return self.tag
class City(models.Model):
city = models.CharField(max_length=100)
slug = AutoSlugField(populate_from='name', unique=True)
def __unicode__(self):
return self.city
class Listings(models.Model):
listing = models.CharField(max_length=50)
description = models.CharField(max_length=500)
email = models.EmailField(max_length=75)
url = models.URLField(max_length = 200)
tag = models.ManyToManyField(Tag)
city = models.ManyToManyField(City)
pub_date = models.DateTimeField(auto_now=True)
def __unicode__(self):
return self.listing
I'm a newbie at Django / South! Thanks in advance for your help.