KnowledgeHub
Questions
Tags
Users
Search
Alex Rivera
|
Logout
Edit Question
Title
Body
I added a many-to-many field to an existing model and was expecting syncdb to create a new table, but there's nothing there. This is what the model looks like: class Author(models.Model): first_name = models.CharField(max_length=50) last_name = models.CharField(max_length=50) email = models.EmailField() def __unicode__(self): return "{0} {1}".format(self.first_name, self.last_name) class Book(models.Model): title = models.CharField(max_length=100) authors = models.ManyToManyField(Author) def __unicode__(self): return self.title Running sql myapp prints the correct statements with the new table, but this is not reflected when I run syncdb . validate also returns no errors. Does anyone know what could be the matter here? Or a better diagnostic?
Tags (comma-separated)
Save Edits
Cancel