Skip to content

Commit

Permalink
unicode: Fixed #4493 -- Fixed a problem where a __unicode__ method wa…
Browse files Browse the repository at this point in the history
…s not

returning a unicode object.


git-svn-id: http://code.djangoproject.com/svn/django/branches/unicode@5447 bcc190cf-cafb-0310-a4f2-bffc1f526a37
  • Loading branch information
malcolmt committed Jun 9, 2007
1 parent 322c3e1 commit 75d29fa
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions django/oldforms/__init__.py
Expand Up @@ -3,7 +3,7 @@
from django.utils.html import escape
from django.conf import settings
from django.utils.translation import ugettext, ungettext
from django.utils.encoding import smart_unicode, smart_str
from django.utils.encoding import smart_unicode, force_unicode, smart_str

FORM_FIELD_ID_PREFIX = 'id_'

Expand Down Expand Up @@ -171,7 +171,7 @@ def __str__(self):

def __unicode__(self):
"Renders the field"
return self.formfield.render(self.data)
return force_unicode(self.formfield.render(self.data))

def __repr__(self):
return '<FormFieldWrapper for "%s">' % self.formfield.field_name
Expand Down

0 comments on commit 75d29fa

Please sign in to comment.