Question

For testing purposes I'm trying to use SQLite, but it seems I'm missing the spatialite backend:

django.core.exceptions.ImproperlyConfigured: 'django.contrib.gis.backends.spatialite' isn't an available database backend.
Try using django.db.backends.XXX, where XXX is one of:
    'dummy', 'mysql', 'oracle', 'postgresql_psycopg2', 'sqlite3'
Error was: No module named backends.spatialite.base

Any idea how I can make Django find it?

I have installed spatialite.

This is my db setup:

DATABASES['default'] = {
    'ENGINE': 'django.contrib.gis.backends.spatialite',
    'NAME': '/tmp/test.db'
}

Ubuntu 12.04.1 LTS; Python 2.7.3; Django 1.4.1

Was it helpful?

Solution

You should look for:

django.contrib.gis.db.backends.spatialite

not

django.contrib.gis.backends.spatialite

:)

trying importing from shell

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top