Django, South and Name Conflicts

(Originally posted August 5, 2013)

I ran across an odd error when I was working on a messaging app. As you can imagine, I had a an app named messages. As usual with south, to create the migrations, we run

$ python manage.py schemamigration --initial messages
$ python manage.py migrate messages

With this, I saw the correct output from south and everything seemed fine… except I kept getting error messages that said that there weren’t tables created for other apps. After redoing the database a couple times, and getting different, but similar errors, I stepped back and looked at the output from syncdb. What I saw was that django.contrib.messages had been integrated into south. South apparently takes the name and matches it to the first match it finds in installed apps. Since this was listed above my messages app, I wasn’t seeing the migrations from my one. And I saw that there was no migration folder in the app like there should be.

After removing django.contrib.messages from installed apps (since I wasn’t using it anyway), the migrations worked and the errors stopped.

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s