web/lib/django/contrib/gis/db/backend/__init__.py
author ymh <ymh.work@gmail.com>
Fri, 29 Jan 2010 05:14:15 +0100
changeset 17 dc40652282ad
parent 0 0d40e90630ef
child 29 cc9b7e14412b
permissions -rw-r--r--
Added tag V00.06 for changeset 146d86480e85

"""
 This module provides the backend for spatial SQL construction with Django.

 Specifically, this module will import the correct routines and modules
 needed for GeoDjango to interface with the spatial database.
"""
from django.conf import settings
from django.contrib.gis.db.backend.util import gqn

# Retrieving the necessary settings from the backend.
if settings.DATABASE_ENGINE == 'postgresql_psycopg2':
    from django.contrib.gis.db.backend.postgis import create_test_spatial_db, get_geo_where_clause, SpatialBackend
elif settings.DATABASE_ENGINE == 'oracle':
    from django.contrib.gis.db.backend.oracle import create_test_spatial_db, get_geo_where_clause, SpatialBackend
elif settings.DATABASE_ENGINE == 'mysql':
    from django.contrib.gis.db.backend.mysql import create_test_spatial_db, get_geo_where_clause, SpatialBackend
elif settings.DATABASE_ENGINE == 'sqlite3':
    from django.contrib.gis.db.backend.spatialite import create_test_spatial_db, get_geo_where_clause, SpatialBackend
else:
    raise NotImplementedError('No Geographic Backend exists for %s' % settings.DATABASE_ENGINE)