Ticket #5851: widgets_2.diff
File widgets_2.diff, 727 bytes (added by , 17 years ago) |
---|
-
django/newforms/widgets.py
442 442 """ 443 443 A Widget that splits datetime input into two <input type="text"> boxes. 444 444 """ 445 def __init__(self, attrs= None):446 widgets = (TextInput(attrs=attrs ), TextInput(attrs=attrs))447 super(SplitDateTimeWidget, self).__init__(widgets, attrs)445 def __init__(self, attrs=(None, None)): 446 widgets = (TextInput(attrs=attrs[0]), TextInput(attrs=attrs[1])) 447 super(SplitDateTimeWidget, self).__init__(widgets, None) 448 448 449 449 def decompress(self, value): 450 450 if value: