/django/contrib/gis/db/backend/__init__.py

https://code.google.com/p/mango-py/ · Python · 11 lines · 10 code · 1 blank · 0 comment · 1 complexity · bd55bb2f4957315f15b2a388c5c14bfc MD5 · raw file

  1. from django.db import connection
  2. if hasattr(connection.ops, 'spatial_version'):
  3. from warnings import warn
  4. warn('The `django.contrib.gis.db.backend` module was refactored and '
  5. 'renamed to `django.contrib.gis.db.backends` in 1.2. '
  6. 'All functionality of `SpatialBackend` '
  7. 'has been moved to the `ops` attribute of the spatial database '
  8. 'backend. A `SpatialBackend` alias is provided here for '
  9. 'backwards-compatibility, but will be removed in 1.3.')
  10. SpatialBackend = connection.ops