diff options
| author | Malcolm Tredinnick <malcolm.tredinnick@gmail.com> | 2007-05-14 14:02:36 +0000 |
|---|---|---|
| committer | Malcolm Tredinnick <malcolm.tredinnick@gmail.com> | 2007-05-14 14:02:36 +0000 |
| commit | f15036ae6de5b2a4a6640aeabab16076217e9ea2 (patch) | |
| tree | dec9242e5278295ed9f4cac628909d8f2266c3f2 /django | |
| parent | c89dc9cfa0c8f59da93de05bb41c923f9397595e (diff) | |
Renamed form-specific cleaning methods to be do_clean_*, rather than clean_*.
This avoids a name clash that would occur when you had a form field called
"data" (because clean_data is already a dictionary on the Form class).
Backwards incompatible change.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@5231 bcc190cf-cafb-0310-a4f2-bffc1f526a37
Diffstat (limited to 'django')
| -rw-r--r-- | django/newforms/forms.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/django/newforms/forms.py b/django/newforms/forms.py index edd1992cf4..f624e005e9 100644 --- a/django/newforms/forms.py +++ b/django/newforms/forms.py @@ -184,8 +184,8 @@ class BaseForm(StrAndUnicode): try: value = field.clean(value) self.clean_data[name] = value - if hasattr(self, 'clean_%s' % name): - value = getattr(self, 'clean_%s' % name)() + if hasattr(self, 'do_clean_%s' % name): + value = getattr(self, 'do_clean_%s' % name)() self.clean_data[name] = value except ValidationError, e: errors[name] = e.messages |
