diff options
| author | Justin Bronn <jbronn@geodjango.org> | 2012-08-04 18:10:34 -0700 |
|---|---|---|
| committer | Justin Bronn <jbronn@geodjango.org> | 2012-08-04 18:10:34 -0700 |
| commit | 1c3464e809bf84a18cf909959e910b8c6e5df0db (patch) | |
| tree | 8eafc9a2fae0c5146430f1c5fc76a79635dec77a | |
| parent | 5d4f993bb1f01c3a79194031827380dc763ce628 (diff) | |
Fixed testing on SpatiaLite 2.4, which has support for `InitSpatialMetaData`.
| -rw-r--r-- | django/contrib/gis/db/backends/spatialite/creation.py | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/django/contrib/gis/db/backends/spatialite/creation.py b/django/contrib/gis/db/backends/spatialite/creation.py index 31f2fca1bd..d0a5f82033 100644 --- a/django/contrib/gis/db/backends/spatialite/creation.py +++ b/django/contrib/gis/db/backends/spatialite/creation.py @@ -99,14 +99,14 @@ class SpatiaLiteCreation(DatabaseCreation): """ This routine loads up the SpatiaLite SQL file. """ - if self.connection.ops.spatial_version[:2] >= (3, 0): - # Spatialite >= 3.0.x -- No need to load any SQL file, calling + if self.connection.ops.spatial_version[:2] >= (2, 4): + # Spatialite >= 2.4 -- No need to load any SQL file, calling # InitSpatialMetaData() transparently creates the spatial metadata # tables cur = self.connection._cursor() cur.execute("SELECT InitSpatialMetaData()") else: - # Spatialite < 3.0.x -- Load the initial SQL + # Spatialite < 2.4 -- Load the initial SQL # Getting the location of the SpatiaLite SQL file, and confirming # it exists. |
