[Fixed]-Trouble getting Django set up on Heroku using South – keep getting ProgrammingError: relation does not exist

21👍

There’s a circular import that should’ve been handled by just deferring the creation of api_userprofile, but because of how South handles transactions, it breaks.

So! Easiest way to make this work is to get syncdb to make all the tables and just fake the migration:

python manage.py syncdb --all

That gets us:

Synced:
 > django.contrib.admin
 > django.contrib.auth
 > django.contrib.contenttypes
 > django.contrib.sessions
 > django.contrib.messages
 > django.contrib.staticfiles
 > api
 > extapi
 > moodranker
 > recommender
 > south
 > rest_framework

Not synced (use migrations):
 - 

Then fake the migrations:

python manage.py migrate --fake

0👍

Delete your migrations folder and then do

python manage.py makemigrations appname

python manage.py migrate --run-syncdb

python manage.py migrate --fake appname

Leave a comment