Django

Code

Show
Ignore:
Timestamp:
06/09/07 09:44:27 (2 years ago)
Author:
mtredinnick
Message:

unicode: Fixed #4493 -- Fixed a problem where a unicode method was not
returning a unicode object.

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • django/branches/unicode/django/oldforms/__init__.py

    r5400 r5447  
    44from django.conf import settings 
    55from django.utils.translation import ugettext, ungettext 
    6 from django.utils.encoding import smart_unicode, smart_str 
     6from django.utils.encoding import smart_unicode, force_unicode, smart_str 
    77 
    88FORM_FIELD_ID_PREFIX = 'id_' 
     
    172172    def __unicode__(self): 
    173173        "Renders the field" 
    174         return self.formfield.render(self.data
     174        return force_unicode(self.formfield.render(self.data)
    175175 
    176176    def __repr__(self):