Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

[1.2.X] Fixed #14060 -- PostGIS never implemented the `~=` operator f…

…or geography types, so removed support for it.

Backport of r13757 from trunk.


git-svn-id: http://code.djangoproject.com/svn/django/branches/releases/1.2.X@13758 bcc190cf-cafb-0310-a4f2-bffc1f526a37
  • Loading branch information...
commit 31744a78cd8fe8b3c9878e8c2219fa63e0078e83 1 parent 24586d4
Justin Bronn authored September 12, 2010
2  django/contrib/gis/db/backends/postgis/operations.py
@@ -233,8 +233,6 @@ def get_dist_ops(operator):
233 233
                     })
234 234
             self.geography_operators = {
235 235
                 'bboverlaps' : PostGISOperator('&&'),
236  
-                'exact' : PostGISOperator('~='),
237  
-                'same_as' : PostGISOperator('~='),
238 236
                 }
239 237
 
240 238
         # Creating a dictionary lookup of all GIS terms for PostGIS.
4  django/contrib/gis/tests/geogapp/tests.py
@@ -44,6 +44,10 @@ def test04_invalid_operators_functions(self):
44 44
         # `@` operator not available.
45 45
         self.assertRaises(ValueError, City.objects.filter(point__contained=z.poly).count)
46 46
 
  47
+        # Regression test for #14060, `~=` was never really implemented for PostGIS.
  48
+        htown = City.objects.get(name='Houston')
  49
+        self.assertRaises(ValueError, City.objects.get, point__exact=htown.point)
  50
+
47 51
     def test05_geography_layermapping(self):
48 52
         "Testing LayerMapping support on models with geography fields."
49 53
         # There is a similar test in `layermap` that uses the same data set,

0 notes on commit 31744a7

Please sign in to comment.
Something went wrong with that request. Please try again.