Changeset 6451
- Timestamp:
- 10/03/07 20:20:27 (1 year ago)
- Files:
-
- django/trunk/django/newforms/widgets.py (modified) (5 diffs)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
django/trunk/django/newforms/widgets.py
r6450 r6451 97 97 98 98 def __init__(self, attrs=None, render_value=True): 99 s elf.attrs = attrs or {}99 super(PasswordInput, self).__init__(attrs) 100 100 self.render_value = render_value 101 101 … … 114 114 """ 115 115 def __init__(self, attrs=None, choices=()): 116 super(MultipleHiddenInput, self).__init__(attrs) 116 117 # choices can be any iterable 117 self.attrs = attrs or {}118 118 self.choices = choices 119 119 … … 154 154 class CheckboxInput(Widget): 155 155 def __init__(self, attrs=None, check_test=bool): 156 super(CheckboxInput, self).__init__(attrs) 156 157 # check_test is a callable that takes a value and returns True 157 158 # if the checkbox should be checked for that value. 158 self.attrs = attrs or {}159 159 self.check_test = check_test 160 160 … … 173 173 class Select(Widget): 174 174 def __init__(self, attrs=None, choices=()): 175 s elf.attrs = attrs or {}175 super(Select, self).__init__(attrs) 176 176 # choices can be any iterable, but we may need to render this widget 177 177 # multiple times. Thus, collapse it into a list so it can be consumed … … 212 212 class SelectMultiple(Widget): 213 213 def __init__(self, attrs=None, choices=()): 214 super(SelectMultiple, self).__init__(attrs) 214 215 # choices can be any iterable 215 self.attrs = attrs or {}216 216 self.choices = choices 217 217
