From 6733c3980444a793c115a43ed6602b45fc615983 Mon Sep 17 00:00:00 2001 From: Adrian Holovaty Date: Wed, 13 Dec 2006 06:44:57 +0000 Subject: [PATCH] Fixed #3112 -- Changed newforms Form.as_table() to use instead of for first column git-svn-id: http://code.djangoproject.com/svn/django/trunk@4197 bcc190cf-cafb-0310-a4f2-bffc1f526a37 --- django/newforms/forms.py | 2 +- tests/regressiontests/forms/tests.py | 122 +++++++++++++-------------- 2 files changed, 62 insertions(+), 62 deletions(-) diff --git a/django/newforms/forms.py b/django/newforms/forms.py index 09419f9a0df..0c5219dfe28 100644 --- a/django/newforms/forms.py +++ b/django/newforms/forms.py @@ -111,7 +111,7 @@ class Form(StrAndUnicode): def as_table(self): "Returns this form rendered as HTML s -- excluding the
." - return self._html_output(u'%(label)s%(field)s', u'%s', '', True) + return self._html_output(u'%(label)s%(field)s', u'%s', '', True) def as_ul(self): "Returns this form rendered as HTML
  • s -- excluding the ." diff --git a/tests/regressiontests/forms/tests.py b/tests/regressiontests/forms/tests.py index 77520602873..af5089c2e65 100644 --- a/tests/regressiontests/forms/tests.py +++ b/tests/regressiontests/forms/tests.py @@ -1343,9 +1343,9 @@ First name John Last name Lennon Birthday 1940-10-9 >>> print p - - - + + + Empty dictionaries are valid, too. >>> p = Person({}) @@ -1355,18 +1355,18 @@ Empty dictionaries are valid, too. False >>> print p - + - + - + >>> print p.as_table() - + - + - + >>> print p.as_ul()
  • @@ -1388,13 +1388,13 @@ Form.is_valid() will return False. >>> p.is_valid() False >>> print p - - - + + + >>> print p.as_table() - - - + + + >>> print p.as_ul()
  • @@ -1407,7 +1407,7 @@ False Unicode values are handled properly. >>> p = Person({'first_name': u'John', 'last_name': u'\u0160\u0110\u0106\u017d\u0107\u017e\u0161\u0111', 'birthday': '1940-10-9'}) >>> p.as_table() -u'\n\n' +u'\n\n' >>> p.as_ul() u'
  • \n
  • \n
  • ' >>> p.as_p() @@ -1449,9 +1449,9 @@ into which the field's name will be inserted. It will also put a