1
0
mirror of https://github.com/django/django.git synced 2025-07-04 09:49:12 +00:00

[1.2.X] Fixed #14060 -- PostGIS never implemented the ~= operator for 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
This commit is contained in:
Justin Bronn 2010-09-12 02:09:17 +00:00
parent 24586d4d86
commit 31744a78cd
2 changed files with 4 additions and 2 deletions

View File

@ -233,8 +233,6 @@ class PostGISOperations(DatabaseOperations, BaseSpatialOperations):
})
self.geography_operators = {
'bboverlaps' : PostGISOperator('&&'),
'exact' : PostGISOperator('~='),
'same_as' : PostGISOperator('~='),
}
# Creating a dictionary lookup of all GIS terms for PostGIS.

View File

@ -44,6 +44,10 @@ class GeographyTest(TestCase):
# `@` 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,