summaryrefslogtreecommitdiff
path: root/docs/ref
diff options
context:
space:
mode:
Diffstat (limited to 'docs/ref')
-rw-r--r--docs/ref/contrib/admin/index.txt13
1 files changed, 13 insertions, 0 deletions
diff --git a/docs/ref/contrib/admin/index.txt b/docs/ref/contrib/admin/index.txt
index 669fc185a4..6bffa6850c 100644
--- a/docs/ref/contrib/admin/index.txt
+++ b/docs/ref/contrib/admin/index.txt
@@ -971,11 +971,24 @@ subclass::
limit the ``list_filter`` choices to the users who have written a book
instead of listing all users.
+ You can filter empty values using ``EmptyFieldListFilter``, which can
+ filter on both empty strings and nulls, depending on what the field
+ allows to store::
+
+ class BookAdmin(admin.ModelAdmin):
+ list_filter = (
+ ('title', admin.EmptyFieldListFilter),
+ )
+
.. note::
The ``FieldListFilter`` API is considered internal and might be
changed.
+ .. versionadded:: 3.1
+
+ The ``EmptyFieldListFilter`` class was added.
+
List filter's typically appear only if the filter has more than one choice.
A filter's ``has_output()`` method controls whether or not it appears.