Ticket #13315: 13315.1.diff

File 13315.1.diff, 2.8 KB (added by jbronn, 9 years ago)

Provides backwards-compatibility aliases.

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

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

     
    5555    valid_aggregates = dict([(k, None) for k in ('Extent', 'Union')])
    5656
    5757    Adapter = SpatiaLiteAdapter
     58    Adaptor = Adapter # Backwards-compatibility alias.
    5859
    5960    area = 'Area'
    6061    centroid = 'Centroid'
  • django/contrib/gis/db/backends/mysql/operations.py

     
    1313    from_text = 'GeomFromText'
    1414
    1515    Adapter = WKTAdapter
     16    Adaptor = Adapter # Backwards-compatibility alias.
    1617
    1718    geometry_functions = {
    1819        'bbcontains' : 'MBRContains', # For consistency w/PostGIS API
  • django/contrib/gis/db/backends/oracle/operations.py

     
    7575    valid_aggregates = dict([(a, None) for a in ('Union', 'Extent')])
    7676
    7777    Adapter = OracleSpatialAdapter
     78    Adaptor = Adapter # Backwards-compatibility alias.
    7879
    7980    area = 'SDO_GEOM.SDO_AREA'
    8081    gml= 'SDO_UTIL.TO_GMLGEOMETRY'
  • django/contrib/gis/db/backends/postgis/operations.py

     
    6666                             ('Collect', 'Extent', 'Extent3D', 'MakeLine', 'Union')])
    6767
    6868    Adapter = PostGISAdapter
     69    Adaptor = Adapter # Backwards-compatibility alias.
    6970
    7071    def __init__(self, connection):
    7172        super(PostGISOperations, self).__init__(connection)
Back to Top