Modified docs about SpatiaLite version that doesn't need manual initial SQL file loading as per 675431dfaa
.
This commit is contained in:
parent
f5ea730dac
commit
6786b38ace
|
@ -582,7 +582,7 @@ Creating a spatial database for SpatiaLite
|
||||||
After you've installed SpatiaLite, you'll need to create a number of spatial
|
After you've installed SpatiaLite, you'll need to create a number of spatial
|
||||||
metadata tables in your database in order to perform spatial queries.
|
metadata tables in your database in order to perform spatial queries.
|
||||||
|
|
||||||
If you're using SpatiaLite 3.0 or newer, use the ``spatialite`` utility to
|
If you're using SpatiaLite 2.4 or newer, use the ``spatialite`` utility to
|
||||||
call the ``InitSpatialMetaData()`` function, like this::
|
call the ``InitSpatialMetaData()`` function, like this::
|
||||||
|
|
||||||
$ spatialite geodjango.db "SELECT InitSpatialMetaData();"
|
$ spatialite geodjango.db "SELECT InitSpatialMetaData();"
|
||||||
|
@ -593,12 +593,10 @@ call the ``InitSpatialMetaData()`` function, like this::
|
||||||
You can safely ignore the error messages shown. When you've done this, you can
|
You can safely ignore the error messages shown. When you've done this, you can
|
||||||
skip the rest of this section.
|
skip the rest of this section.
|
||||||
|
|
||||||
If you're using a version of SpatiaLite older than 3.0, you'll need to download
|
If you're using SpatiaLite 2.3, you'll need to download a
|
||||||
a database-initialization file and execute its SQL queries in your database.
|
database-initialization file and execute its SQL queries in your database.
|
||||||
|
|
||||||
First, get it from the appropriate SpatiaLite Resources page (
|
First, get it from the `SpatiaLite Resources`__ page::
|
||||||
http://www.gaia-gis.it/spatialite-2.3.1/resources.html for 2.3 or
|
|
||||||
http://www.gaia-gis.it/spatialite-2.4.0/ for 2.4)::
|
|
||||||
|
|
||||||
$ wget http://www.gaia-gis.it/spatialite-2.3.1/init_spatialite-2.3.sql.gz
|
$ wget http://www.gaia-gis.it/spatialite-2.3.1/init_spatialite-2.3.sql.gz
|
||||||
$ gunzip init_spatialite-2.3.sql.gz
|
$ gunzip init_spatialite-2.3.sql.gz
|
||||||
|
@ -613,6 +611,8 @@ Then, use the ``spatialite`` command to initialize a spatial database::
|
||||||
you want to use. Use the same in the :setting:`DATABASES` ``"name"`` key
|
you want to use. Use the same in the :setting:`DATABASES` ``"name"`` key
|
||||||
inside your ``settings.py``.
|
inside your ``settings.py``.
|
||||||
|
|
||||||
|
__ http://www.gaia-gis.it/spatialite-2.3.1/resources.html
|
||||||
|
|
||||||
Add ``django.contrib.gis`` to :setting:`INSTALLED_APPS`
|
Add ``django.contrib.gis`` to :setting:`INSTALLED_APPS`
|
||||||
-------------------------------------------------------
|
-------------------------------------------------------
|
||||||
|
|
||||||
|
|
|
@ -119,7 +119,7 @@ Settings
|
||||||
``SPATIALITE_SQL``
|
``SPATIALITE_SQL``
|
||||||
^^^^^^^^^^^^^^^^^^
|
^^^^^^^^^^^^^^^^^^
|
||||||
|
|
||||||
Only relevant when using a SpatiaLite version older than 3.0.
|
Only relevant when using a SpatiaLite version 2.3.
|
||||||
|
|
||||||
By default, the GeoDjango test runner looks for the :ref:`file containing the
|
By default, the GeoDjango test runner looks for the :ref:`file containing the
|
||||||
SpatiaLite dababase-initialization SQL code <create_spatialite_db>` in the
|
SpatiaLite dababase-initialization SQL code <create_spatialite_db>` in the
|
||||||
|
|
Loading…
Reference in New Issue