[1.8.x] Documented INSTALLED_APPS requirement for HStoreField.

Backport of 618bc4e653 from master
This commit is contained in:
Tim Graham 2015-04-24 08:25:33 -04:00
parent fe533fc537
commit fa49b99e31
1 changed files with 9 additions and 5 deletions

View File

@ -251,11 +251,15 @@ HStoreField
A field for storing mappings of strings to strings. The Python data type A field for storing mappings of strings to strings. The Python data type
used is a ``dict``. used is a ``dict``.
To use this field, you'll need to setup the hstore extension in PostgreSQL To use this field, you'll need to:
by adding a migration with the
:class:`~django.contrib.postgres.operations.HStoreExtension` operation. 1. Add ``'django.contrib.postgres'`` in your :setting:`INSTALLED_APPS`.
You'll see an error like ``'type "hstore" does not exist'`` if you skip 2. Setup the hstore extension in PostgreSQL before the first ``CreateModel``
this step. or ``AddField`` operation by adding a migration with the
:class:`~django.contrib.postgres.operations.HStoreExtension` operation.
You'll see an error like ``can't adapt type 'dict'`` if you skip the first
step, or ``type "hstore" does not exist`` if you skip the second.
.. note:: .. note::