mirror of
https://github.com/encode/django-rest-framework.git
synced 2025-02-03 05:04:31 +03:00
add support for Yes/No literals with BooleanField (#7701)
This commit is contained in:
parent
b463878132
commit
e9a54e38e1
|
@ -704,7 +704,7 @@ class BooleanField(Field):
|
|||
initial = False
|
||||
TRUE_VALUES = {
|
||||
't', 'T',
|
||||
'y', 'Y', 'yes', 'YES',
|
||||
'y', 'Y', 'yes', 'Yes', 'YES',
|
||||
'true', 'True', 'TRUE',
|
||||
'on', 'On', 'ON',
|
||||
'1', 1,
|
||||
|
@ -712,7 +712,7 @@ class BooleanField(Field):
|
|||
}
|
||||
FALSE_VALUES = {
|
||||
'f', 'F',
|
||||
'n', 'N', 'no', 'NO',
|
||||
'n', 'N', 'no', 'No', 'NO',
|
||||
'false', 'False', 'FALSE',
|
||||
'off', 'Off', 'OFF',
|
||||
'0', 0, 0.0,
|
||||
|
|
Loading…
Reference in New Issue
Block a user