Ticket #12303: 12303.diff
File 12303.diff, 992 bytes (added by , 15 years ago) |
---|
-
django/forms/fields.py
43 43 ) 44 44 45 45 # These values, if given to to_python(), will trigger the self.required check. 46 EMPTY_VALUES = (None, '' )46 EMPTY_VALUES = (None, '', ['', '']) 47 47 48 48 49 49 class Field(object): -
tests/regressiontests/forms/forms.py
1807 1807 >>> [f.name for f in form.visible_fields()] 1808 1808 ['artist', 'name'] 1809 1809 1810 # Making required=False work with SplitDateTime ############################ 1811 1812 >>> class SplitDateTimeForm(Form): 1813 ... dt = DateTimeField(required=False, 1814 ... widget=widgets.SplitDateTimeWidget()) 1815 >>> f = SplitDateTimeForm({'dt_0': '', 'dt_1': ''}) 1816 >>> f.is_valid() 1817 True 1818 1810 1819 """