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 got this error when trying to run tests with the test db set like so:
if 'test' in sys.argv:
DATABASES = {
'default': {
'ENGINE': 'django.db.backends.sqlite3',
'NAME': '_testdb',
}
}
Problem being that the sqlite3 DatabaseOperations object doesn't have the attribute geo_db_type (like the title of this post suggests).
My solution was to change the backend to the sqlite equivalent GIS engine:
'ENGINE': 'django.contrib.gis.db.backends.spatialite'
See the django docs on geodjango installation for all the possible backends, with installation instructions: https://docs.djangoproject.com/en/3.0/ref/contrib/gis/install/#spatial-database