Code

Ticket #5081: patch.2.diff

File patch.2.diff, 440 bytes (added by k0001 <gnuk0001@…>, 7 years ago)

django/newforms/fields.py

Line 
1--- fields.py   2007-08-04 06:34:12.000000000 -0300
2+++ fields.py.new       2007-08-04 06:33:52.000000000 -0300
3@@ -380,6 +380,9 @@
4 class BooleanField(Field):
5     widget = CheckboxInput
6 
7+    def __init__(self, required=False, *args, **kwargs):
8+       super(BooleanField, self).__init__(required=required, *args, **kwargs)
9+
10     def clean(self, value):
11         "Returns a Python boolean object."
12         super(BooleanField, self).clean(value)