mirror of
https://github.com/django/django.git
synced 2024-12-25 10:35:48 +00:00
Edited docs/newforms.txt changes from [6532]
git-svn-id: http://code.djangoproject.com/svn/django/trunk@6769 bcc190cf-cafb-0310-a4f2-bffc1f526a37
This commit is contained in:
parent
7628381eb8
commit
e0e084e017
@ -884,12 +884,11 @@ classes::
|
|||||||
<li>Instrument: <input type="text" name="instrument" /></li>
|
<li>Instrument: <input type="text" name="instrument" /></li>
|
||||||
<li>Haircut type: <input type="text" name="haircut_type" /></li>
|
<li>Haircut type: <input type="text" name="haircut_type" /></li>
|
||||||
|
|
||||||
|
|
||||||
Prefixes for forms
|
Prefixes for forms
|
||||||
------------------
|
------------------
|
||||||
|
|
||||||
You can put several Django forms inside one ``<form>`` tag. To give each
|
You can put several Django forms inside one ``<form>`` tag. To give each
|
||||||
``Form`` its own namespace you need to use the ``prefix`` keyword argument::
|
``Form`` its own namespace, use the ``prefix`` keyword argument::
|
||||||
|
|
||||||
>>> mother = PersonForm(prefix="mother")
|
>>> mother = PersonForm(prefix="mother")
|
||||||
>>> father = PersonForm(prefix="father")
|
>>> father = PersonForm(prefix="father")
|
||||||
@ -900,7 +899,6 @@ You can put several Django forms inside one ``<form>`` tag. To give each
|
|||||||
<li><label for="id_father-first_name">First name:</label> <input type="text" name="father-first_name" id="id_father-first_name" /></li>
|
<li><label for="id_father-first_name">First name:</label> <input type="text" name="father-first_name" id="id_father-first_name" /></li>
|
||||||
<li><label for="id_father-last_name">Last name:</label> <input type="text" name="father-last_name" id="id_father-last_name" /></li>
|
<li><label for="id_father-last_name">Last name:</label> <input type="text" name="father-last_name" id="id_father-last_name" /></li>
|
||||||
|
|
||||||
|
|
||||||
Fields
|
Fields
|
||||||
======
|
======
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user