Ticket #13315: 13315.2.diff
File 13315.2.diff, 3.4 KB (added by , 15 years ago) |
---|
-
django/contrib/gis/db/backend/__init__.py
1 from django.db import connection 2 3 if 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 12 -
django/contrib/gis/db/backends/spatialite/operations.py
55 55 valid_aggregates = dict([(k, None) for k in ('Extent', 'Union')]) 56 56 57 57 Adapter = SpatiaLiteAdapter 58 Adaptor = Adapter # Backwards-compatibility alias. 58 59 59 60 area = 'Area' 60 61 centroid = 'Centroid' -
django/contrib/gis/db/backends/mysql/operations.py
13 13 from_text = 'GeomFromText' 14 14 15 15 Adapter = WKTAdapter 16 Adaptor = Adapter # Backwards-compatibility alias. 16 17 17 18 geometry_functions = { 18 19 'bbcontains' : 'MBRContains', # For consistency w/PostGIS API -
django/contrib/gis/db/backends/oracle/operations.py
75 75 valid_aggregates = dict([(a, None) for a in ('Union', 'Extent')]) 76 76 77 77 Adapter = OracleSpatialAdapter 78 Adaptor = Adapter # Backwards-compatibility alias. 78 79 79 80 area = 'SDO_GEOM.SDO_AREA' 80 81 gml= 'SDO_UTIL.TO_GMLGEOMETRY' -
django/contrib/gis/db/backends/postgis/operations.py
66 66 ('Collect', 'Extent', 'Extent3D', 'MakeLine', 'Union')]) 67 67 68 68 Adapter = PostGISAdapter 69 Adaptor = Adapter # Backwards-compatibility alias. 69 70 70 71 def __init__(self, connection): 71 72 super(PostGISOperations, self).__init__(connection) -
django/contrib/gis/models.py
1 from django.db import connection 2 3 if (hasattr(connection.ops, 'spatial_version') and 4 not connection.ops.mysql): 5 # Getting the `SpatialRefSys` and `GeometryColumns` 6 # models for the default spatial backend. These 7 # aliases are provided for backwards-compatibility. 8 SpatialRefSys = connection.ops.spatial_ref_sys() 9 GeometryColumns = connection.ops.geometry_columns()