summaryrefslogtreecommitdiff
path: root/django/forms
diff options
context:
space:
mode:
authorJannis Leidel <jannis@leidel.info>2010-01-09 22:51:03 +0000
committerJannis Leidel <jannis@leidel.info>2010-01-09 22:51:03 +0000
commit5e83b79d260598fcdcc2014f99e6669c5b2a44f7 (patch)
treedb73e298f51ce61411dad57158458f93ef7578e3 /django/forms
parent4700200383f69495724cffa0c8be33f16c29409a (diff)
Fixed #12466 - Set HTML class attributes for each field separately. Thanks for the patch, Bernd Schlapsi.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@12153 bcc190cf-cafb-0310-a4f2-bffc1f526a37
Diffstat (limited to 'django/forms')
-rw-r--r--django/forms/forms.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/django/forms/forms.py b/django/forms/forms.py
index d484300a0d..c53a901e73 100644
--- a/django/forms/forms.py
+++ b/django/forms/forms.py
@@ -138,9 +138,9 @@ class BaseForm(StrAndUnicode):
"Helper function for outputting HTML. Used by as_table(), as_ul(), as_p()."
top_errors = self.non_field_errors() # Errors that should be displayed above all fields.
output, hidden_fields = [], []
- html_class_attr = ''
for name, field in self.fields.items():
+ html_class_attr = ''
bf = BoundField(self, field, name)
bf_errors = self.error_class([conditional_escape(error) for error in bf.errors]) # Escape and cache in local variable.
if bf.is_hidden: