最新消息:雨落星辰是一个专注网站SEO优化、网站SEO诊断、搜索引擎研究、网络营销推广、网站策划运营及站长类的自媒体原创博客

heroku django Spatilite Unable to load the SpatiaLite library extension - Stack Overflow

programmeradmin6浏览0评论

Hi I get error while i'm trying to run my application on heroku with Spatialite:

Unable to load the SpatiaLite library extension. Library names tried: mod_spatialite.so, mod_spatialite.

my settings.py:

DATABASES = {
    'default': {
        'ENGINE': 'django.db.backends.sqlite3',
        # 'ENGINE':'django.contrib.gis.db.backends.postgis',
        # 'ENGINE': 'django.db.backends.sqlite3',
        'NAME': BASE_DIR / 'db.sqlite3',
    }
}

django_heroku.settings(locals()) # geodjango=True

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'
发布评论

评论列表(0)

  1. 暂无评论