~ubuntu-branches/ubuntu/saucy/python-django/saucy-updates

« back to all changes in this revision

Viewing changes to django/contrib/gis/db/backends/spatialite/operations.py

  • Committer: Package Import Robot
  • Author(s): Luke Faraone
  • Date: 2013-08-13 16:49:39 UTC
  • mfrom: (1.3.9)
  • mto: This revision was merged to the branch mainline in revision 47.
  • Revision ID: package-import@ubuntu.com-20130813164939-irlkd7hokvcgocfl
Tags: upstream-1.5.2
ImportĀ upstreamĀ versionĀ 1.5.2

Show diffs side-by-side

added added

removed removed

Lines of Context:
10
10
from django.db.backends.sqlite3.base import DatabaseOperations
11
11
from django.db.utils import DatabaseError
12
12
from django.utils import six
 
13
from django.utils.functional import cached_property
 
14
 
13
15
 
14
16
class SpatiaLiteOperator(SpatialOperation):
15
17
    "For SpatiaLite operators (e.g. `&&`, `~`)."
146
148
            except DatabaseError:
147
149
                # we are using < 2.4.0-RC4
148
150
                pass
149
 
        if version >= (3, 0, 0):
150
 
            self.geojson = 'AsGeoJSON'
 
151
 
 
152
    @cached_property
 
153
    def geojson(self):
 
154
        return 'AsGeoJSON' if self.spatialite_version_tuple()[1:] >= (3, 0, 0) else None
151
155
 
152
156
    def check_aggregate_support(self, aggregate):
153
157
        """