mirror of
https://github.com/django/django.git
synced 2025-07-05 18:29:11 +00:00
[1.3.X] Fixed link to SpatiaLite 2.x initial SQL files.
Backport of [17491] and [17496] from trunk. Refs #17554. git-svn-id: http://code.djangoproject.com/svn/django/branches/releases/1.3.X@17498 bcc190cf-cafb-0310-a4f2-bffc1f526a37
This commit is contained in:
parent
a7a703dbdc
commit
2646df4537
@ -572,15 +572,30 @@ Creating a Spatial Database for SpatiaLite
|
||||
-------------------------------------------
|
||||
|
||||
After the SpatiaLite library and tools have been installed, it is now possible
|
||||
to create spatial database for use with GeoDjango. In order to do this, download
|
||||
the spatial database initialization SQL from the `SpatiaLite Resources`__ page::
|
||||
to create a spatial database for use with GeoDjango.
|
||||
|
||||
$ wget http://www.gaia-gis.it/spatialite/init_spatialite-2.3.sql.gz
|
||||
For this, a number of spatial metadata tables must be created in the database
|
||||
before any spatial query is performed against it. You need to download a
|
||||
database initialization file and execute the SQL queries it contains against
|
||||
your database.
|
||||
|
||||
First, get it from the appropiate SpatiaLite Resources page (i.e.
|
||||
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
|
||||
$ gunzip init_spatialite-2.3.sql.gz
|
||||
|
||||
(Or, if you are using SpatiaLite 2.4 then do::
|
||||
|
||||
$ wget http://www.gaia-gis.it/spatialite-2.4.0/init_spatialite-2.4.sql.gz
|
||||
$ gunzip init_spatialite-2.4.sql.gz
|
||||
|
||||
)
|
||||
|
||||
Now, the ``spatialite`` command can be used to initialize a spatial database::
|
||||
|
||||
$ spatialite geodjango.db < init_spatialite-2.3.sql
|
||||
$ spatialite geodjango.db < init_spatialite-2.X.sql
|
||||
|
||||
.. note::
|
||||
|
||||
@ -588,10 +603,6 @@ Now, the ``spatialite`` command can be used to initialize a spatial database::
|
||||
you want to use. Use the same in the :setting:`DATABASE_NAME`
|
||||
inside your ``settings.py``.
|
||||
|
||||
|
||||
__ http://www.gaia-gis.it/spatialite/resources.html
|
||||
|
||||
|
||||
Add ``django.contrib.gis`` to :setting:`INSTALLED_APPS`
|
||||
-------------------------------------------------------
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user