equal
deleted
inserted
replaced
|
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_spatial_db, get_geo_where_clause, SpatialBackend |
|
13 elif settings.DATABASE_ENGINE == 'oracle': |
|
14 from django.contrib.gis.db.backend.oracle import create_spatial_db, get_geo_where_clause, SpatialBackend |
|
15 elif settings.DATABASE_ENGINE == 'mysql': |
|
16 from django.contrib.gis.db.backend.mysql import create_spatial_db, get_geo_where_clause, SpatialBackend |
|
17 else: |
|
18 raise NotImplementedError('No Geographic Backend exists for %s' % settings.DATABASE_ENGINE) |