~ubuntu-branches/ubuntu/jaunty/python-django/jaunty-backports

« back to all changes in this revision

Viewing changes to docs/topics/forms/formsets.txt

  • Committer: Bazaar Package Importer
  • Author(s): Scott James Remnant
  • Date: 2008-11-15 19:15:33 UTC
  • mfrom: (1.1.6 upstream)
  • Revision ID: james.westby@ubuntu.com-20081115191533-xbt1ut2xf4fvwtvc
Tags: 1.0.1-0ubuntu1
* New upstream release:
  - Bug fixes.

* The tests/ sub-directory appaers to have been dropped upstream, so pull
  our patch to workaround the tests and modify the rules.

Show diffs side-by-side

added added

removed removed

Lines of Context:
76
76
    <tr><th><label for="id_form-0-title">Title:</label></th><td><input type="text" name="form-0-title" id="id_form-0-title" /></td></tr>
77
77
    <tr><th><label for="id_form-0-pub_date">Pub date:</label></th><td><input type="text" name="form-0-pub_date" id="id_form-0-pub_date" /></td></tr>
78
78
 
79
 
The default value of ``max_num`` is ``0`` which is the same as saying put no
80
 
limit on the number forms displayed.
 
79
A ``max_num`` value of ``0`` (the default) puts no limit on the number forms
 
80
displayed.
81
81
 
82
82
Formset validation
83
83
------------------
306
306
            formset = ArticleFormSet()
307
307
        return render_to_response('manage_articles.html', {'formset': formset})
308
308
 
309
 
The ``manage_articles.html`` template might look like this::
 
309
The ``manage_articles.html`` template might look like this:
 
310
 
 
311
.. code-block:: html+django
310
312
 
311
313
    <form method="POST" action="">
312
314
        {{ formset.management_form }}
318
320
    </form>
319
321
 
320
322
However the above can be slightly shortcutted and let the formset itself deal
321
 
with the management form::
 
323
with the management form:
 
324
 
 
325
.. code-block:: html+django
322
326
 
323
327
    <form method="POST" action="">
324
328
        <table>