Fixed #25379 -- Removed obsolete information from GeoDjango tutorial.
Django 1.9 drops support for PostgreSQL 9.0 where creating a database using a template was needed.
This commit is contained in:
parent
0cc0e676c0
commit
dfced0921c
|
@ -63,6 +63,9 @@ spatial functionality::
|
||||||
$ psql <db name>
|
$ psql <db name>
|
||||||
> CREATE EXTENSION postgis;
|
> CREATE EXTENSION postgis;
|
||||||
|
|
||||||
|
The database user must be a superuser in order to run
|
||||||
|
``CREATE EXTENSION postgis;``.
|
||||||
|
|
||||||
GeoDjango does not currently leverage any `PostGIS topology functionality`__.
|
GeoDjango does not currently leverage any `PostGIS topology functionality`__.
|
||||||
If you plan to use those features at some point, you can also install the
|
If you plan to use those features at some point, you can also install the
|
||||||
``postgis_topology`` extension by issuing ``CREATE EXTENSION
|
``postgis_topology`` extension by issuing ``CREATE EXTENSION
|
||||||
|
|
|
@ -46,37 +46,11 @@ Setting Up
|
||||||
Create a Spatial Database
|
Create a Spatial Database
|
||||||
-------------------------
|
-------------------------
|
||||||
|
|
||||||
.. note::
|
Typically no special setup is required, so you can create a database as you
|
||||||
|
would for any other project. We provide some tips for selected databases:
|
||||||
|
|
||||||
MySQL and Oracle users can skip this section because spatial types
|
* :doc:`install/postgis`
|
||||||
are already built into the database.
|
* :doc:`install/spatialite`
|
||||||
|
|
||||||
First, create a spatial database for your project.
|
|
||||||
|
|
||||||
If you are using PostGIS, create the database from the :ref:`spatial database
|
|
||||||
template <spatialdb_template>`:
|
|
||||||
|
|
||||||
.. code-block:: console
|
|
||||||
|
|
||||||
$ createdb -T template_postgis geodjango
|
|
||||||
|
|
||||||
.. note::
|
|
||||||
|
|
||||||
This command must be issued by a database user with enough privileges to
|
|
||||||
create a database. To create a user with ``CREATE DATABASE`` privileges in
|
|
||||||
PostgreSQL, use the following commands:
|
|
||||||
|
|
||||||
.. code-block:: console
|
|
||||||
|
|
||||||
$ sudo su - postgres
|
|
||||||
$ createuser --createdb geo
|
|
||||||
$ exit
|
|
||||||
|
|
||||||
Replace ``geo`` with your Postgres database user's username.
|
|
||||||
(In PostgreSQL, this user will also be an OS-level user.)
|
|
||||||
|
|
||||||
If you are using SQLite and SpatiaLite, consult the instructions on how
|
|
||||||
to create a :ref:`SpatiaLite database <create_spatialite_db>`.
|
|
||||||
|
|
||||||
Create a New Project
|
Create a New Project
|
||||||
------------------------
|
------------------------
|
||||||
|
|
Loading…
Reference in New Issue