From f911df19a455246198b0c8c81ab96bf2abec04f8 Mon Sep 17 00:00:00 2001 From: Honza Král Date: Mon, 28 Dec 2009 16:35:23 +0000 Subject: [soc2009/model-validation] Merget to trunk at r12009 git-svn-id: http://code.djangoproject.com/svn/django/branches/soc2009/model-validation@12014 bcc190cf-cafb-0310-a4f2-bffc1f526a37 --- tests/regressiontests/forms/forms.py | 39 ++++++++++++++++++++++++++++++++++++ 1 file changed, 39 insertions(+) (limited to 'tests/regressiontests/forms/forms.py') diff --git a/tests/regressiontests/forms/forms.py b/tests/regressiontests/forms/forms.py index bf9623fe77..627f50a6fe 100644 --- a/tests/regressiontests/forms/forms.py +++ b/tests/regressiontests/forms/forms.py @@ -1807,4 +1807,43 @@ True >>> [f.name for f in form.visible_fields()] ['artist', 'name'] +# Hidden initial input gets its own unique id ################################ + +>>> class MyForm(Form): +... field1 = CharField(max_length=50, show_hidden_initial=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