Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Added '1' and '0' as allowed text input for BooleanFields. This was r…

…equired to acommodate XML serializers when using MySQL.

git-svn-id: http://code.djangoproject.com/svn/django/trunk@3844 bcc190cf-cafb-0310-a4f2-bffc1f526a37
  • Loading branch information...
commit 83501405c25b85abde529fa7e205a00100211e5c 1 parent 83613ad
@freakboy3742 freakboy3742 authored
Showing with 2 additions and 2 deletions.
  1. +2 −2 django/db/models/fields/__init__.py
View
4 django/db/models/fields/__init__.py
@@ -367,8 +367,8 @@ def __init__(self, *args, **kwargs):
def to_python(self, value):
if value in (True, False): return value
- if value in ('t', 'True'): return True
- if value in ('f', 'False'): return False
+ if value in ('t', 'True', '1'): return True
+ if value in ('f', 'False', '0'): return False
raise validators.ValidationError, gettext("This value must be either True or False.")
def get_manipulator_field_objs(self):
Please sign in to comment.
Something went wrong with that request. Please try again.