Changes between Initial Version and Version 4 of Ticket #19537
- Timestamp:
- Dec 29, 2012, 9:21:58 AM (12 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
Ticket #19537
- Property Component Uncategorized → Forms
-
Ticket #19537 – Description
initial v4 1 django.forms.CheckboxInput 2 3 have method 4 1 `django.forms.CheckboxInput` have method 2 {{{ 5 3 def _has_changed(self, initial, data): 6 4 # Sometimes data or initial could be None or u'' which should be the 7 5 # same thing as False. 8 6 return bool(initial) != bool(data) 9 7 }}} 10 8 initial may be u'False' or u'True' 11 9 bool(initial) always return True for unicode len(initial) > 1 … … 15 13 bool(u'on') = True 16 14 path: 15 {{{ 17 16 def _has_changed(self, initial, data): 18 17 initial = True if initial == u'True' else False 19 18 return initial != bool(data) 19 }}}