mirror of
https://github.com/encode/django-rest-framework.git
synced 2025-02-24 15:30:45 +03:00
Merge pull request #5038 from htmis/master
Update Boolean field to support 'yes' and 'no' values
This commit is contained in:
commit
fe33b2d0b6
|
@ -649,6 +649,7 @@ class BooleanField(Field):
|
|||
initial = False
|
||||
TRUE_VALUES = {
|
||||
't', 'T',
|
||||
'y', 'Y', 'yes', 'YES',
|
||||
'true', 'True', 'TRUE',
|
||||
'on', 'On', 'ON',
|
||||
'1', 1,
|
||||
|
@ -656,6 +657,7 @@ class BooleanField(Field):
|
|||
}
|
||||
FALSE_VALUES = {
|
||||
'f', 'F',
|
||||
'n', 'N', 'no', 'NO',
|
||||
'false', 'False', 'FALSE',
|
||||
'off', 'Off', 'OFF',
|
||||
'0', 0, 0.0,
|
||||
|
|
Loading…
Reference in New Issue
Block a user