From 5c8b26df151117c2d0db8ad73681599cb79864bb Mon Sep 17 00:00:00 2001 From: Gary Wilson Jr Date: Fri, 19 Oct 2007 04:47:07 +0000 Subject: [PATCH] Fixed #5666 -- Documented the `prefix` keyword argument for newforms. git-svn-id: http://code.djangoproject.com/svn/django/trunk@6532 bcc190cf-cafb-0310-a4f2-bffc1f526a37 --- docs/newforms.txt | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/docs/newforms.txt b/docs/newforms.txt index 2005adeec8..3a9f539dc8 100644 --- a/docs/newforms.txt +++ b/docs/newforms.txt @@ -860,6 +860,23 @@ classes::
  • Instrument:
  • Haircut type:
  • + +Prefixes for forms +------------------ + +You can put several Django forms inside one ``
    `` tag. To give each +``Form`` its own namespace you need to use the ``prefix`` keyword argument:: + + >>> mother = PersonForm(prefix="mother") + >>> father = PersonForm(prefix="father") + >>> print mother.as_ul() +
  • +
  • + >>> print father.as_ul() +
  • +
  • + + Fields ======