Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

unicode: Fixed #4493 -- Fixed a problem where a __unicode__ method wa…

…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...
commit 75d29fa448a8b99f7ca1b4859f20fb57ea15f695 1 parent 322c3e1
@malcolmt malcolmt authored
Showing with 2 additions and 2 deletions.
  1. +2 −2 django/oldforms/__init__.py
View
4 django/oldforms/__init__.py
@@ -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_'
@@ -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
Please sign in to comment.
Something went wrong with that request. Please try again.