Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

newforms: Small potential bugfix in Form.as_ul() -- called unicode() …

…on BoundField rather than str()

git-svn-id: http://code.djangoproject.com/svn/django/trunk@4174 bcc190cf-cafb-0310-a4f2-bffc1f526a37
  • Loading branch information...
commit 88f1dd31b7054b905768e1e7121fc3c14e9c5343 1 parent 12e9a84
@adrianholovaty adrianholovaty authored
Showing with 2 additions and 2 deletions.
  1. +2 −2 django/newforms/forms.py
View
4 django/newforms/forms.py
@@ -78,7 +78,7 @@ def as_table(self):
output = []
for name, field in self.fields.items():
bf = BoundField(self, field, name)
- bf_errors = bf.errors
+ bf_errors = bf.errors # Cache in local variable.
if bf.is_hidden:
if bf_errors:
top_errors.extend(['(Hidden field %s) %s' % (name, e) for e in bf_errors])
@@ -101,7 +101,7 @@ def as_ul(self):
new_errors = bf.errors # Cache in local variable.
if new_errors:
top_errors.extend(['(Hidden field %s) %s' % (name, e) for e in new_errors])
- output.append(str(bf))
+ output.append(unicode(bf))
else:
output.append(u'<li>%s%s %s</li>' % (bf.errors, bf.label_tag(escape(bf.verbose_name+':')), bf))
if top_errors:
Please sign in to comment.
Something went wrong with that request. Please try again.