Author: jbronn
Date: 2010-09-11 21:07:04 -0500 (Sat, 11 Sep 2010)
New Revision: 13757
Modified:
django/trunk/django/contrib/gis/db/backends/postgis/operations.py
django/trunk/django/contrib/gis/tests/geogapp/tests.py
Log:
Fixed #14060 -- PostGIS never implemented the `~=` operator for geography
types, so removed support for it.
Modified: django/trunk/django/contrib/gis/db/backends/postgis/operations.py
===================================================================
--- django/trunk/django/contrib/gis/db/backends/postgis/operations.py
2010-09-12 01:44:51 UTC (rev 13756)
+++ django/trunk/django/contrib/gis/db/backends/postgis/operations.py
2010-09-12 02:07:04 UTC (rev 13757)
@@ -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/trunk/django/contrib/gis/tests/geogapp/tests.py
===================================================================
--- django/trunk/django/contrib/gis/tests/geogapp/tests.py 2010-09-12
01:44:51 UTC (rev 13756)
+++ django/trunk/django/contrib/gis/tests/geogapp/tests.py 2010-09-12
02:07:04 UTC (rev 13757)
@@ -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 [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/django-updates?hl=en.