Fixed a Python 2.3 problem.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@6644 bcc190cf-cafb-0310-a4f2-bffc1f526a37
This commit is contained in:
parent
99697d9bec
commit
77a846bab0
|
@ -1,6 +1,7 @@
|
|||
# -*- coding: utf-8 -*-
|
||||
tests = r"""
|
||||
>>> from django.newforms import *
|
||||
>>> from django.utils.encoding import force_unicode
|
||||
>>> import datetime
|
||||
>>> import time
|
||||
>>> import re
|
||||
|
@ -362,7 +363,7 @@ u'sirrobin'
|
|||
... return self.as_divs()
|
||||
... def as_divs(self):
|
||||
... if not self: return u''
|
||||
... return u'<div class="errorlist">%s</div>' % ''.join([u'<div class="error">%s</div>' % e for e in self])
|
||||
... return u'<div class="errorlist">%s</div>' % ''.join([u'<div class="error">%s</div>' % force_unicode(e) for e in self])
|
||||
>>> class CommentForm(Form):
|
||||
... name = CharField(max_length=50, required=False)
|
||||
... email = EmailField()
|
||||
|
|
Loading…
Reference in New Issue