1
0
mirror of https://github.com/django/django.git synced 2025-10-27 15:46:10 +00:00

Fixed #25605 -- Made GIS DB functions accept geometric expressions, not only values, in all positions.

This commit is contained in:
Sergey Fedoseev
2017-04-01 18:47:49 +05:00
committed by Tim Graham
parent e487ffd3f0
commit bde86ce9ae
6 changed files with 144 additions and 75 deletions

View File

@@ -429,6 +429,9 @@ class DistanceFunctionsTests(TestCase):
self.assertTrue(
SouthTexasInterstate.objects.annotate(length=Length('path')).filter(length__gt=4000).exists()
)
# Length with an explicit geometry value.
qs = Interstate.objects.annotate(length=Length(i10.path))
self.assertAlmostEqual(qs.first().length.m, len_m2, 2)
@skipUnlessDBFeature("has_Perimeter_function")
def test_perimeter(self):