web/lib/django/contrib/gis/db/backend/__init__.py
changeset 0 0d40e90630ef
child 29 cc9b7e14412b
equal deleted inserted replaced
-1:000000000000 0:0d40e90630ef
       
     1 """
       
     2  This module provides the backend for spatial SQL construction with Django.
       
     3 
       
     4  Specifically, this module will import the correct routines and modules
       
     5  needed for GeoDjango to interface with the spatial database.
       
     6 """
       
     7 from django.conf import settings
       
     8 from django.contrib.gis.db.backend.util import gqn
       
     9 
       
    10 # Retrieving the necessary settings from the backend.
       
    11 if settings.DATABASE_ENGINE == 'postgresql_psycopg2':
       
    12     from django.contrib.gis.db.backend.postgis import create_test_spatial_db, get_geo_where_clause, SpatialBackend
       
    13 elif settings.DATABASE_ENGINE == 'oracle':
       
    14     from django.contrib.gis.db.backend.oracle import create_test_spatial_db, get_geo_where_clause, SpatialBackend
       
    15 elif settings.DATABASE_ENGINE == 'mysql':
       
    16     from django.contrib.gis.db.backend.mysql import create_test_spatial_db, get_geo_where_clause, SpatialBackend
       
    17 elif settings.DATABASE_ENGINE == 'sqlite3':
       
    18     from django.contrib.gis.db.backend.spatialite import create_test_spatial_db, get_geo_where_clause, SpatialBackend
       
    19 else:
       
    20     raise NotImplementedError('No Geographic Backend exists for %s' % settings.DATABASE_ENGINE)