app/django/contrib/gis/db/backend/__init__.py
author Pawel Solyga <Pawel.Solyga@gmail.com>
Tue, 20 Jan 2009 16:08:16 +0000
changeset 834 b60c9ccbeaa5
parent 323 ff1a9aa48cfd
permissions -rw-r--r--
Move member_template property from Group to Organization model since it's Organization specific property. Patch by: Pawel Solyga Review by: to-be-reviewed

"""
 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_spatial_db, get_geo_where_clause, SpatialBackend
elif settings.DATABASE_ENGINE == 'oracle':
    from django.contrib.gis.db.backend.oracle import create_spatial_db, get_geo_where_clause, SpatialBackend
elif settings.DATABASE_ENGINE == 'mysql':
    from django.contrib.gis.db.backend.mysql import create_spatial_db, get_geo_where_clause, SpatialBackend
else:
    raise NotImplementedError('No Geographic Backend exists for %s' % settings.DATABASE_ENGINE)