I\'m attempting to run heroku run python manage.py syncdb on my GeoDjango app on Heroku, but I get the following error:
AttributeError: \'Databa
I'm using the Python sample application on stack cedar 14 and the regular Heroko buildpack heroku/python with PostGIS and had the same problem that my database settings were overwritten with the wrong DB engine, which caused heroku run python manage.py migrate to fail with above error.
Just adding the engine in the settings would not change anything.
After some investigation I found out that it is the call to django_heroku.settings(locals()) in the last line if my settings.py which is reverting my changes.
I fixed it by overwriting the engine again like this by adding a line afterwards:
django_heroku.settings(locals())
DATABASES['default']['ENGINE'] = 'django.contrib.gis.db.backends.postgis'