Ticket #5104: checkboxinput.patch
File checkboxinput.patch, 712 bytes (added by , 17 years ago) |
---|
-
django/newforms/widgets.py
153 153 final_attrs['value'] = force_unicode(value) # Only add the 'value' attribute if a value is non-empty. 154 154 return u'<input%s />' % flatatt(final_attrs) 155 155 156 def value_from_datadict(self, data, name): 157 # A missing value returns False rather than None because it 158 # simply means the check box wasn't checked). 159 value = data.get(name, False) 160 156 161 class Select(Widget): 157 162 def __init__(self, attrs=None, choices=()): 158 163 self.attrs = attrs or {}