From 92803205cbcaaee16ac0eb724c45019a9d896aac Mon Sep 17 00:00:00 2001 From: Jacob Kaplan-Moss Date: Sat, 12 Dec 2009 18:52:12 +0000 Subject: Fixed #3512: it's now possible to add CSS hooks to required/erroneous form rows. Thanks, SmileyChris. git-svn-id: http://code.djangoproject.com/svn/django/trunk@11830 bcc190cf-cafb-0310-a4f2-bffc1f526a37 --- tests/regressiontests/forms/forms.py | 32 ++++++++++++++++++++++++++++++++ 1 file changed, 32 insertions(+) (limited to 'tests/regressiontests/forms/forms.py') diff --git a/tests/regressiontests/forms/forms.py b/tests/regressiontests/forms/forms.py index b204580131..627f50a6fe 100644 --- a/tests/regressiontests/forms/forms.py +++ b/tests/regressiontests/forms/forms.py @@ -1814,4 +1814,36 @@ True >>> print MyForm() +# The error_html_class and required_html_class attributes #################### + +>>> p = Person({}) +>>> p.error_css_class = 'error' +>>> p.required_css_class = 'required' + +>>> print p.as_ul() +
  • +
  • + +>>> print p.as_p() + +

    +

    + +>>> print p.as_table() + + + + """ -- cgit v1.3