Ticket #11908: 11908.diff

File 11908.diff, 1.2 KB (added by Tim Graham, 14 years ago)
  • docs/topics/forms/formsets.txt

     
    122122Understanding the ManagementForm
    123123~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    124124
    125 You may have noticed the additional data that was required in the formset's
    126 data above. This data is coming from the ``ManagementForm``. This form is
    127 dealt with internally to the formset. If you don't use it, it will result in
    128 an exception::
     125You may have noticed the additional data (``form-TOTAL_FORMS`` and
     126``form-INITIAL_FORMS``) that was required in the formset's data above. This data
     127is coming from the ``ManagementForm``. This form is dealt with internally to the
     128formset. If you don't use it, it will result in an exception::
    129129
    130130    >>> data = {
    131131    ...     'form-0-title': u'Test',
     
    138138
    139139It is used to keep track of how many form instances are being displayed. If
    140140you are adding new forms via JavaScript, you should increment the count fields
    141 in this form as well.
     141in this form as well. The easiest way to add this data to your form is to
     142include ``{{ formset.management_form }}`` in your template.
    142143
    143144.. versionadded:: 1.1
    144145
Back to Top