From 6da14b12958044cc94c812963a9f5e3815ddd83a Mon Sep 17 00:00:00 2001 From: Gaetano Guerriero Date: Thu, 11 Apr 2019 23:45:34 +0200 Subject: [PATCH] document HStoreField allow_empty parameter --- docs/api-guide/fields.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/docs/api-guide/fields.md b/docs/api-guide/fields.md index 30484195e..b84bc772f 100644 --- a/docs/api-guide/fields.md +++ b/docs/api-guide/fields.md @@ -489,9 +489,10 @@ You can also use the declarative style, as with `ListField`. For example: A preconfigured `DictField` that is compatible with Django's postgres `HStoreField`. -**Signature**: `HStoreField(child=)` +**Signature**: `HStoreField(child=, allow_empty=True)` - `child` - A field instance that is used for validating the values in the dictionary. The default child field accepts both empty strings and null values. +- `allow_empty` - Designates if empty dictionaries are allowed. Note that the child field **must** be an instance of `CharField`, as the hstore extension stores values as strings.