diff options
| author | Nick Pope <nick.pope@flightdataservices.com> | 2020-10-13 17:02:16 +0100 |
|---|---|---|
| committer | Mariusz Felisiak <felisiak.mariusz@gmail.com> | 2020-11-14 07:59:05 +0100 |
| commit | d55cd4c62a4deac16a656594953071083dccdad2 (patch) | |
| tree | 2419d89548b362a3fe23a96e9a6be6f32ca9743b /docs | |
| parent | 4f11461195cb604109defcf2c176191cc2804a8e (diff) | |
[3.1.x] Doc'd that admin site booleans are tri-state.
Backport of 300def5c344c65df4bcf1f5141c886da93c41ed1 from master
Diffstat (limited to 'docs')
| -rw-r--r-- | docs/ref/contrib/admin/index.txt | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/docs/ref/contrib/admin/index.txt b/docs/ref/contrib/admin/index.txt index 0fe1424782..de721d231b 100644 --- a/docs/ref/contrib/admin/index.txt +++ b/docs/ref/contrib/admin/index.txt @@ -606,8 +606,8 @@ subclass:: and add that method's name to ``list_display``. (See below for more on custom methods in ``list_display``.) - * If the field is a ``BooleanField``, Django will display a pretty "on" or - "off" icon instead of ``True`` or ``False``. + * If the field is a ``BooleanField``, Django will display a pretty "yes", + "no", or "unknown" icon instead of ``True``, ``False``, or ``None``. * If the string given is a method of the model, ``ModelAdmin`` or a callable, Django will HTML-escape the output by default. To escape @@ -664,9 +664,9 @@ subclass:: birth_date_view.empty_value_display = 'unknown' * If the string given is a method of the model, ``ModelAdmin`` or a - callable that returns True or False Django will display a pretty - "on" or "off" icon if you give the method a ``boolean`` attribute - whose value is ``True``. + callable that returns ``True``, ``False``, or ``None``, Django will + display a pretty "yes", "no", or "unknown" icon if you give the method a + ``boolean`` attribute whose value is ``True``. Here's a full example model:: |
