summaryrefslogtreecommitdiff
path: root/docs/ref
diff options
context:
space:
mode:
authorClaude Paroz <claude@2xlibre.net>2016-09-01 15:59:33 +0200
committerTim Graham <timograham@gmail.com>2016-09-01 14:06:22 -0400
commit0a81f540c9ad94301bbdf615a216ee8bffbceac7 (patch)
tree6e48dfd0df7438b3bc4ac4f6c1395daa4cca25cb /docs/ref
parent2078b187f7f3d1985fd7457b4bd259fe1d75b8cb (diff)
[1.10.x] Refs #27162 -- Complemented docs related to CreateExtension
Thanks Tim Graham for the review. Backport of 6b54504e667da3f6bc53b887ffd7e8cc113a94b1 from master
Diffstat (limited to 'docs/ref')
-rw-r--r--docs/ref/contrib/gis/install/postgis.txt12
-rw-r--r--docs/ref/databases.txt7
2 files changed, 18 insertions, 1 deletions
diff --git a/docs/ref/contrib/gis/install/postgis.txt b/docs/ref/contrib/gis/install/postgis.txt
index 646e2aae2b..8416f790c8 100644
--- a/docs/ref/contrib/gis/install/postgis.txt
+++ b/docs/ref/contrib/gis/install/postgis.txt
@@ -65,7 +65,17 @@ functionality::
The database user must be a superuser in order to run
``CREATE EXTENSION postgis;``. The command is run during the :djadmin:`migrate`
-process.
+process. An alternative is to use a migration operation in your project::
+
+ from django.contrib.postgresql.operations import CreateExtension
+ from django.db import migrations
+
+ class Migration(migrations.Migration):
+
+ operations = [
+ CreateExtension('postgis'),
+ ...
+ ]
GeoDjango does not currently leverage any `PostGIS topology functionality`__.
If you plan to use those features at some point, you can also install the
diff --git a/docs/ref/databases.txt b/docs/ref/databases.txt
index edbe72c1ec..1bc3f68d7f 100644
--- a/docs/ref/databases.txt
+++ b/docs/ref/databases.txt
@@ -164,6 +164,13 @@ lookups that use the ``LIKE`` operator in their SQL, as is done with the
.. _PostgreSQL operator class: http://www.postgresql.org/docs/current/static/indexes-opclass.html
+Migration operation for adding extensions
+-----------------------------------------
+
+If you need to add a PostgreSQL extension (like ``hstore``, ``postgis``, etc.)
+using a migration, use the
+:class:`~django.contrib.postgres.operations.CreateExtension` operation.
+
Speeding up test execution with non-durable settings
----------------------------------------------------