Ticket #5524: ticket_5524__revision_6369.diff
File ticket_5524__revision_6369.diff, 903 bytes (added by , 17 years ago) |
---|
-
django/newforms/forms.py
202 202 self.cleaned_data = self.clean() 203 203 except ValidationError, e: 204 204 self._errors[NON_FIELD_ERRORS] = e.messages 205 if self._errors:206 delattr(self, 'cleaned_data')207 205 208 206 def clean(self): 209 207 """ … … 298 296 """ 299 297 Returns the data for this BoundField, or None if it wasn't given. 300 298 """ 301 return self.f ield.widget.value_from_datadict(self.form.data, self.form.files, self.html_name)299 return self.form.cleaned_data.get(self.name, self.field.widget.value_from_datadict(self.form.data, self.form.files, self.html_name)) 302 300 data = property(_data) 303 301 304 302 def label_tag(self, contents=None, attrs=None):