Django

Code

Changeset 7186

Show
Ignore:
Timestamp:
02/29/08 13:05:52 (9 months ago)
Author:
mtredinnick
Message:

Fixed #5811 -- Added an explicit conversion to unicode that was otherwise causing problems in some cases. Thanks, Mike Maravillo.

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • django/trunk/django/newforms/forms.py

    r7115 r7186  
    130130            if bf.is_hidden: 
    131131                if bf_errors: 
    132                     top_errors.extend(['(Hidden field %s) %s' % (name, force_unicode(e)) for e in bf_errors]) 
     132                    top_errors.extend([u'(Hidden field %s) %s' % (name, force_unicode(e)) for e in bf_errors]) 
    133133                hidden_fields.append(unicode(bf)) 
    134134            else: 
     
    151151                output.append(normal_row % {'errors': force_unicode(bf_errors), 'label': force_unicode(label), 'field': unicode(bf), 'help_text': help_text}) 
    152152        if top_errors: 
    153             output.insert(0, error_row % top_errors
     153            output.insert(0, error_row % force_unicode(top_errors)
    154154        if hidden_fields: # Insert any hidden fields in the last row. 
    155155            str_hidden = u''.join(hidden_fields)