newforms: Fixed Unicode issue on Python 2.3 when a BoundField's __unicode__() included non-ASCII characters. Thanks for reporting the error, Johannes Froehlich

git-svn-id: http://code.djangoproject.com/svn/django/trunk@4296 bcc190cf-cafb-0310-a4f2-bffc1f526a37
This commit is contained in:
Adrian Holovaty 2007-01-09 03:37:22 +00:00
parent f6390e8983
commit 54b8277ffb
1 changed files with 1 additions and 1 deletions

View File

@ -99,7 +99,7 @@ class BaseForm(StrAndUnicode):
if errors_on_separate_row and bf_errors: if errors_on_separate_row and bf_errors:
output.append(error_row % bf_errors) output.append(error_row % bf_errors)
label = bf.label and bf.label_tag(escape(bf.label + ':')) or '' label = bf.label and bf.label_tag(escape(bf.label + ':')) or ''
output.append(normal_row % {'errors': bf_errors, 'label': label, 'field': bf}) output.append(normal_row % {'errors': bf_errors, 'label': label, 'field': unicode(bf)})
if top_errors: if top_errors:
output.insert(0, error_row % top_errors) output.insert(0, error_row % top_errors)
if hidden_fields: # Insert any hidden fields in the last row. if hidden_fields: # Insert any hidden fields in the last row.