summaryrefslogtreecommitdiff
path: root/django
diff options
context:
space:
mode:
authorSergey Fedoseev <fedoseev.sergey@gmail.com>2015-12-01 08:08:41 +0500
committerTim Graham <timograham@gmail.com>2015-12-02 17:25:33 -0500
commit0825f77f7626d2ff175c17d06d726bf2f704f12c (patch)
treeeb793e2935cdaf9dcd05861f8111ec84340d4c6c /django
parentd3b488f5bd17b4cf662613e0d3d62f9675ff3cdc (diff)
Fixed #25836 -- Added support for MakeLine aggregate on SpatiaLite.
Diffstat (limited to 'django')
-rw-r--r--django/contrib/gis/db/backends/spatialite/operations.py8
1 files changed, 3 insertions, 5 deletions
diff --git a/django/contrib/gis/db/backends/spatialite/operations.py b/django/contrib/gis/db/backends/spatialite/operations.py
index f4aef508b5..485e7ed419 100644
--- a/django/contrib/gis/db/backends/spatialite/operations.py
+++ b/django/contrib/gis/db/backends/spatialite/operations.py
@@ -39,6 +39,7 @@ class SpatiaLiteOperations(BaseSpatialOperations, DatabaseOperations):
intersection = 'Intersection'
kml = 'AsKML'
length = 'GLength' # OpenGis defines Length, but this conflicts with an SQLite reserved keyword
+ makeline = 'MakeLine'
num_geom = 'NumGeometries'
num_points = 'NumPoints'
point_on_surface = 'PointOnSurface'
@@ -80,6 +81,8 @@ class SpatiaLiteOperations(BaseSpatialOperations, DatabaseOperations):
'distance_lte': SpatialOperator(func='Distance', op='<='),
}
+ disallowed_aggregates = (aggregates.Extent3D,)
+
@cached_property
def function_names(self):
return {
@@ -114,11 +117,6 @@ class SpatiaLiteOperations(BaseSpatialOperations, DatabaseOperations):
raise ImproperlyConfigured('GeoDjango only supports SpatiaLite versions 3.0.0 and above.')
return version
- @cached_property
- def disallowed_aggregates(self):
- disallowed = (aggregates.Extent3D, aggregates.MakeLine)
- return disallowed
-
def convert_extent(self, box, srid):
"""
Convert the polygon data received from Spatialite to min/max values.