Author: jbronn
Date: 2010-09-11 21:09:17 -0500 (Sat, 11 Sep 2010)
New Revision: 13758

Modified:
   
django/branches/releases/1.2.X/django/contrib/gis/db/backends/postgis/operations.py
   django/branches/releases/1.2.X/django/contrib/gis/tests/geogapp/tests.py
Log:
[1.2.X] Fixed #14060 -- PostGIS never implemented the `~=` operator for 
geography types, so removed support for it.

Backport of r13757 from trunk.


Modified: 
django/branches/releases/1.2.X/django/contrib/gis/db/backends/postgis/operations.py
===================================================================
--- 
django/branches/releases/1.2.X/django/contrib/gis/db/backends/postgis/operations.py
 2010-09-12 02:07:04 UTC (rev 13757)
+++ 
django/branches/releases/1.2.X/django/contrib/gis/db/backends/postgis/operations.py
 2010-09-12 02:09:17 UTC (rev 13758)
@@ -233,8 +233,6 @@
                     })
             self.geography_operators = {
                 'bboverlaps' : PostGISOperator('&&'),
-                'exact' : PostGISOperator('~='),
-                'same_as' : PostGISOperator('~='),
                 }
 
         # Creating a dictionary lookup of all GIS terms for PostGIS.

Modified: 
django/branches/releases/1.2.X/django/contrib/gis/tests/geogapp/tests.py
===================================================================
--- django/branches/releases/1.2.X/django/contrib/gis/tests/geogapp/tests.py    
2010-09-12 02:07:04 UTC (rev 13757)
+++ django/branches/releases/1.2.X/django/contrib/gis/tests/geogapp/tests.py    
2010-09-12 02:09:17 UTC (rev 13758)
@@ -44,6 +44,10 @@
         # `...@` operator not available.
         self.assertRaises(ValueError, 
City.objects.filter(point__contained=z.poly).count)
 
+        # Regression test for #14060, `~=` was never really implemented for 
PostGIS.
+        htown = City.objects.get(name='Houston')
+        self.assertRaises(ValueError, City.objects.get, 
point__exact=htown.point)
+
     def test05_geography_layermapping(self):
         "Testing LayerMapping support on models with geography fields."
         # There is a similar test in `layermap` that uses the same data set,

-- 
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To post to this group, send email to django-upda...@googlegroups.com.
To unsubscribe from this group, send email to 
django-updates+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-updates?hl=en.

Reply via email to