mirror of https://github.com/django/django.git
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 -*-
|
# -*- coding: utf-8 -*-
|
||||||
tests = r"""
|
tests = r"""
|
||||||
>>> from django.newforms import *
|
>>> from django.newforms import *
|
||||||
|
>>> from django.utils.encoding import force_unicode
|
||||||
>>> import datetime
|
>>> import datetime
|
||||||
>>> import time
|
>>> import time
|
||||||
>>> import re
|
>>> import re
|
||||||
|
@ -362,7 +363,7 @@ u'sirrobin'
|
||||||
... return self.as_divs()
|
... return self.as_divs()
|
||||||
... def as_divs(self):
|
... def as_divs(self):
|
||||||
... if not self: return u''
|
... 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):
|
>>> class CommentForm(Form):
|
||||||
... name = CharField(max_length=50, required=False)
|
... name = CharField(max_length=50, required=False)
|
||||||
... email = EmailField()
|
... email = EmailField()
|
||||||
|
|
Loading…
Reference in New Issue