diff --git a/django/contrib/gis/db/backends/spatialite/operations.py b/django/contrib/gis/db/backends/spatialite/operations.py
index 5eaa778..151ecfe 100644
a
|
b
|
from django.core.exceptions import ImproperlyConfigured
|
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. `&&`, `~`)." |
… |
… |
class SpatiaLiteOperations(DatabaseOperations, BaseSpatialOperations):
|
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 | """ |