From 88f1dd31b7054b905768e1e7121fc3c14e9c5343 Mon Sep 17 00:00:00 2001 From: Adrian Holovaty Date: Thu, 7 Dec 2006 05:45:22 +0000 Subject: [PATCH] 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 --- django/newforms/forms.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/django/newforms/forms.py b/django/newforms/forms.py index 757de01f06..7f7d56ba1f 100644 --- a/django/newforms/forms.py +++ b/django/newforms/forms.py @@ -78,7 +78,7 @@ class Form(StrAndUnicode): 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 @@ class Form(StrAndUnicode): 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'
  • %s%s %s
  • ' % (bf.errors, bf.label_tag(escape(bf.verbose_name+':')), bf)) if top_errors: