Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Fixed #14060 -- PostGIS never implemented the `~=` operator for geogr…

…aphy types, so removed support for it.

git-svn-id: http://code.djangoproject.com/svn/django/trunk@13757 bcc190cf-cafb-0310-a4f2-bffc1f526a37
  • Loading branch information...
commit 553374b55d21a0c6c477448a6ccadbf9246c9fe4 1 parent f607450
Justin Bronn jbronn authored
2  django/contrib/gis/db/backends/postgis/operations.py
View
@@ -233,8 +233,6 @@ def get_dist_ops(operator):
})
self.geography_operators = {
'bboverlaps' : PostGISOperator('&&'),
- 'exact' : PostGISOperator('~='),
- 'same_as' : PostGISOperator('~='),
}
# Creating a dictionary lookup of all GIS terms for PostGIS.
4 django/contrib/gis/tests/geogapp/tests.py
View
@@ -44,6 +44,10 @@ def test04_invalid_operators_functions(self):
# `@` 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,
Please sign in to comment.
Something went wrong with that request. Please try again.