diff --git a/django/contrib/gis/db/backends/spatialite/base.py b/django/contrib/gis/db/backends/spatialite/base.py
a
|
b
|
|
59 | 59 | except Exception, msg: |
60 | 60 | raise ImproperlyConfigured('Unable to load the SpatiaLite library extension ' |
61 | 61 | '"%s" because: %s' % (self.spatialite_lib, msg)) |
| 62 | |
| 63 | # Populate and check spatial stack components versions |
| 64 | self.ops.confirm_spatial_components_versions() |
| 65 | |
62 | 66 | return cur |
63 | 67 | else: |
64 | 68 | return self.connection.cursor(factory=SQLiteCursorWrapper) |
diff --git a/django/contrib/gis/db/backends/spatialite/operations.py b/django/contrib/gis/db/backends/spatialite/operations.py
a
|
b
|
|
112 | 112 | def __init__(self, connection): |
113 | 113 | super(DatabaseOperations, self).__init__(connection) |
114 | 114 | |
| 115 | # Creating the GIS terms dictionary. |
| 116 | gis_terms = ['isnull'] |
| 117 | gis_terms += self.geometry_functions.keys() |
| 118 | self.gis_terms = dict([(term, None) for term in gis_terms]) |
| 119 | |
| 120 | def confirm_spatial_components_versions(self): |
115 | 121 | # Determine the version of the SpatiaLite library. |
116 | 122 | try: |
117 | 123 | vtup = self.spatialite_version_tuple() |
… |
… |
|
128 | 134 | 'SQL loaded on this database?' % |
129 | 135 | (self.connection.settings_dict['NAME'], msg)) |
130 | 136 | |
131 | | # Creating the GIS terms dictionary. |
132 | | gis_terms = ['isnull'] |
133 | | gis_terms += self.geometry_functions.keys() |
134 | | self.gis_terms = dict([(term, None) for term in gis_terms]) |
135 | | |
136 | 137 | if version >= (2, 4, 0): |
137 | 138 | # Spatialite 2.4.0-RC4 added AsGML and AsKML, however both |
138 | 139 | # RC2 (shipped in popular Debian/Ubuntu packages) and RC4 |