mirror of
https://github.com/django/django.git
synced 2025-07-17 16:19:12 +00:00
Thanks to David Smith for investigation and review. Co-authored-by: Carlton Gibson <carlton.gibson@noumenal.es> Backport of d976c254fc76e5f04d81dfd9d142c58e933c9c92 from master
This commit is contained in:
parent
1f8dbc8fa9
commit
82bdc51e7a
@ -913,6 +913,20 @@ For each field, we describe the default widget used if you don't specify
|
|||||||
* Normalizes to: A Python ``True``, ``False`` or ``None`` value.
|
* Normalizes to: A Python ``True``, ``False`` or ``None`` value.
|
||||||
* Validates nothing (i.e., it never raises a ``ValidationError``).
|
* Validates nothing (i.e., it never raises a ``ValidationError``).
|
||||||
|
|
||||||
|
``NullBooleanField`` may be used with widgets such as
|
||||||
|
:class:`~django.forms.Select` or :class:`~django.forms.RadioSelect`
|
||||||
|
by providing the widget ``choices``::
|
||||||
|
|
||||||
|
NullBooleanField(
|
||||||
|
widget=Select(
|
||||||
|
choices=[
|
||||||
|
('', 'Unknown'),
|
||||||
|
(True, 'Yes'),
|
||||||
|
(False, 'No'),
|
||||||
|
]
|
||||||
|
)
|
||||||
|
)
|
||||||
|
|
||||||
``RegexField``
|
``RegexField``
|
||||||
--------------
|
--------------
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user