Ticket #3896: 3896.diff

File 3896.diff, 690 bytes (added by Gary Wilson <gary.wilson@…>, 18 years ago)

Pass the value to clean_XXX method and don't save to clean_data first.

  • django/newforms/forms.py

    === modified file 'django/newforms/forms.py'
     
    183183            value = field.widget.value_from_datadict(self.data, self.add_prefix(name))
    184184            try:
    185185                value = field.clean(value)
    186                 self.clean_data[name] = value
    187186                if hasattr(self, 'clean_%s' % name):
    188                     value = getattr(self, 'clean_%s' % name)()
     187                    value = getattr(self, 'clean_%s' % name)(value)
    189188                self.clean_data[name] = value
    190189            except ValidationError, e:
    191190                errors[name] = e.messages
Back to Top