heroku / django-heroku

[DEPRECATED] Do not use! See https://github.com/heroku/django-heroku/issues/56
BSD 3-Clause "New" or "Revised" License
459 stars 142 forks source link

Uses wrong database when GeoDjango is in use #6

Open AstraLuma opened 6 years ago

AstraLuma commented 6 years ago

If BUILD_WITH_GEO_LIBRARIES is set, the wrong database engine is used.

My work-around is:

django_heroku.settings(locals())

if DATABASES['default']['ENGINE'] in ('django.db.backends.postgresql', 'django.db.backends.postgresql_psycopg2'):
    DATABASES['default']['ENGINE'] = 'django.contrib.gis.db.backends.postgis'
elif DATABASES['default']['ENGINE'] == 'django.db.backends.sqlite3':
    DATABASES['default']['ENGINE'] = 'django.contrib.gis.db.backends.spatialite'
sigmavirus24 commented 6 years ago

I would happily merge a pull request that fixes this @astronouth7303

raelmax commented 5 years ago

I've open a pull request to fix this issue: https://github.com/heroku/django-heroku/pull/36