Django syncdb not making tables for my app

Posted by Rosarch on Stack Overflow See other posts from Stack Overflow or by Rosarch
Published on 2010-05-13T18:03:24Z Indexed on 2010/05/13 18:34 UTC
Read the original article Hit count: 383

Filed under:
|
|

It used to work, and now it doesn't. python manage.py syncdb no longer makes tables for my app.

From settings.py:

INSTALLED_APPS = (
    'django.contrib.auth',
    'django.contrib.contenttypes',
    'django.contrib.sessions',
    'django.contrib.sites',
    'mysite.myapp',
    'django.contrib.admin',
)

What could I be doing wrong? The break appeared to coincide with editing this model in models.py, but that could be total coincidence. I commented out the lines I changed, and it still doesn't work.

class MyUser(models.Model):
    user = models.ForeignKey(User, unique=True)
    takingReqSets = models.ManyToManyField(RequirementSet, blank=True)
    takingTerms = models.ManyToManyField(Term, blank=True)
    takingCourses = models.ManyToManyField(Course, through=TakingCourse, blank=True)
    school = models.ForeignKey(School)
#    minCreditsPerTerm = models.IntegerField(blank=True)
#    maxCreditsPerTerm = models.IntegerField(blank=True)
#    optimalCreditsPerTerm = models.IntegerField(blank=True)

UPDATE:

When I run python manage.py loadddata initial_data, it gives an error:

DeserializationError: Invalid model identifier: myapp.SomeModel

Loading this data had worked fine before. This error is thrown on the very first data object in the data file.

© Stack Overflow or respective owner

Related posts about python

Related posts about django