File
8000
tree 1 file changed +9
-5
lines changed
docs/ref/contrib/postgres 1 file changed +9
-5
lines changed Original file line number Diff line number Diff line change @@ -251,11 +251,15 @@ HStoreField
251
251
A field for storing mappings of strings to strings. The Python data type
252
252
used is a ``dict``.
253
253
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.
259
263
260
264
.. note::
261
265
You can’t perform that action at this time.
0 commit comments