Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

[1.1.X] Added force_unicode to a test (needed for Python 2.3 compatib…

…ility).

git-svn-id: http://code.djangoproject.com/svn/django/branches/releases/1.1.X@12607 bcc190cf-cafb-0310-a4f2-bffc1f526a37
  • Loading branch information...
commit 14fbee6958e88b8bdee6bee58b7db1cc3f44903c 1 parent 121188e
Karen Tracey kmtracey authored
Showing with 2 additions and 1 deletion.
  1. +2 −1  tests/regressiontests/forms/error_messages.py
3  tests/regressiontests/forms/error_messages.py
View
@@ -362,6 +362,7 @@
# Subclassing ErrorList #######################################################
>>> from django.utils.safestring import mark_safe
+>>> from django.utils.encoding import force_unicode
>>>
>>> class TestForm(Form):
... first_name = CharField()
@@ -377,7 +378,7 @@
... def as_divs(self):
... if not self: return u''
... return mark_safe(u'<div class="error">%s</div>'
-... % ''.join([u'<p>%s</p>' % e for e in self]))
+... % ''.join([u'<p>%s</p>' % force_unicode(e) for e in self]))
...
This form should print errors the default way.
Please sign in to comment.
Something went wrong with that request. Please try again.