diff options
author | The Android Open Source Project <initial-contribution@android.com> | 2008-10-21 07:00:00 -0700 |
---|---|---|
committer | The Android Open Source Project <initial-contribution@android.com> | 2008-10-21 07:00:00 -0700 |
commit | 38966837f9f0b331b3cafa3dccb8b41f8c42c671 (patch) | |
tree | ff79845ba8f053cc0e57ee2020acd5957cc2022e /webapp/django/contrib/gis/db/backend/__init__.py |
Initial Contributionv1.0
Diffstat (limited to 'webapp/django/contrib/gis/db/backend/__init__.py')
-rw-r--r-- | webapp/django/contrib/gis/db/backend/__init__.py | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/webapp/django/contrib/gis/db/backend/__init__.py b/webapp/django/contrib/gis/db/backend/__init__.py new file mode 100644 index 0000000000..172c1268a7 --- /dev/null +++ b/webapp/django/contrib/gis/db/backend/__init__.py @@ -0,0 +1,18 @@ +""" + 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) |