Skip to content

Commit

Permalink
Merge pull request #5038 from htmis/master
Browse files Browse the repository at this point in the history
Update Boolean field to support 'yes' and 'no' values
  • Loading branch information
tomchristie authored Mar 30, 2017
2 parents 4369157 + 4a54d9f commit fe33b2d
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions rest_framework/fields.py
Original file line number Diff line number Diff line change
Expand Up @@ -649,13 +649,15 @@ class BooleanField(Field):
initial = False
TRUE_VALUES = {
't', 'T',
'y', 'Y', 'yes', 'YES',
'true', 'True', 'TRUE',
'on', 'On', 'ON',
'1', 1,
True
}
FALSE_VALUES = {
'f', 'F',
'n', 'N', 'no', 'NO',
'false', 'False', 'FALSE',
'off', 'Off', 'OFF',
'0', 0, 0.0,
Expand Down

0 comments on commit fe33b2d

Please sign in to comment.