Ticket #4593: unicode.newforms.a.patch
File unicode.newforms.a.patch, 1005 bytes (added by , 17 years ago) |
---|
-
forms.py
6 6 7 7 from django.utils.datastructures import SortedDict 8 8 from django.utils.html import escape 9 from django.utils.encoding import StrAndUnicode 9 from django.utils.encoding import StrAndUnicode, smart_unicode 10 10 11 11 from fields import Field 12 12 from widgets import TextInput, Textarea … … 136 136 help_text = help_text_html % field.help_text 137 137 else: 138 138 help_text = u'' 139 output.append(normal_row % {'errors': bf_errors, 'label': label, 'field': unicode(bf), 'help_text': help_text})139 output.append(normal_row % {'errors': bf_errors, 'label': smart_unicode(label), 'field': unicode(bf), 'help_text': help_text}) 140 140 if top_errors: 141 141 output.insert(0, error_row % top_errors) 142 142 if hidden_fields: # Insert any hidden fields in the last row.