8000 Documented INSTALLED_APPS requirement for HStoreField. · ddriddle/django@618bc4e · GitHub
[go: up one dir, main page]

Skip to content

Commit 618bc4e

Browse files
committed
Documented INSTALLED_APPS requirement for HStoreField.
1 parent 6d685b1 commit 618bc4e

File 8000 tree

1 file changed

+9
-5
lines changed

1 file changed

+9
-5
lines changed

docs/ref/contrib/postgres/fields.txt

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -251,11 +251,15 @@ HStoreField
251251
A field for storing mappings of strings to strings. The Python data type
252252
used is a ``dict``.
253253

254-
To use this field, you'll need to setup the hstore extension in PostgreSQL
255-
by adding a migration with the
256-
:class:`~django.contrib.postgres.operations.HStoreExtension` operation.
257-
You'll see an error like ``'type "hstore" does not exist'`` if you skip
258-
this step.
254+
To use this field, you'll need to:
255+
256+
1. Add ``'django.contrib.postgres'`` in your :setting:`INSTALLED_APPS`.
257+
2. Setup the hstore extension in PostgreSQL before the first ``CreateModel``
258+
or ``AddField`` operation by adding a migration with the
259+
:class:`~django.contrib.postgres.operations.HStoreExtension` operation.
260+
261+
You'll see an error like ``can't adapt type 'dict'`` if you skip the first
262+
step, or ``type "hstore" does not exist`` if you skip the second.
259263

260264
.. note::
261265

0 commit comments

Comments
 (0)
0