web/lib/django/contrib/gis/db/backend/__init__.py
author ymh <ymh.work@gmail.com>
Wed, 02 Jun 2010 18:57:35 +0200
changeset 38 77b6da96e6f1
permissions -rw-r--r--
update django
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
38
77b6da96e6f1 update django
ymh <ymh.work@gmail.com>
parents:
diff changeset
     1
from django.db import connection
77b6da96e6f1 update django
ymh <ymh.work@gmail.com>
parents:
diff changeset
     2
77b6da96e6f1 update django
ymh <ymh.work@gmail.com>
parents:
diff changeset
     3
if hasattr(connection.ops, 'spatial_version'):
77b6da96e6f1 update django
ymh <ymh.work@gmail.com>
parents:
diff changeset
     4
    from warnings import warn
77b6da96e6f1 update django
ymh <ymh.work@gmail.com>
parents:
diff changeset
     5
    warn('The `django.contrib.gis.db.backend` module was refactored and '
77b6da96e6f1 update django
ymh <ymh.work@gmail.com>
parents:
diff changeset
     6
         'renamed to `django.contrib.gis.db.backends` in 1.2.  '
77b6da96e6f1 update django
ymh <ymh.work@gmail.com>
parents:
diff changeset
     7
         'All functionality of `SpatialBackend` '
77b6da96e6f1 update django
ymh <ymh.work@gmail.com>
parents:
diff changeset
     8
         'has been moved to the `ops` attribute of the spatial database '
77b6da96e6f1 update django
ymh <ymh.work@gmail.com>
parents:
diff changeset
     9
         'backend.  A `SpatialBackend` alias is provided here for '
77b6da96e6f1 update django
ymh <ymh.work@gmail.com>
parents:
diff changeset
    10
         'backwards-compatibility, but will be removed in 1.3.')
77b6da96e6f1 update django
ymh <ymh.work@gmail.com>
parents:
diff changeset
    11
    SpatialBackend = connection.ops