diff --git a/docs/topics/forms/formsets.txt b/docs/topics/forms/formsets.txt index a3721fdcdf..3faf6e584f 100644 --- a/docs/topics/forms/formsets.txt +++ b/docs/topics/forms/formsets.txt @@ -424,6 +424,33 @@ with the management form: The above ends up calling the ``as_table`` method on the formset class. +.. _manually-rendered-can-delete-and-can-order: + +Manually rendered ``can_delete`` and ``can_order`` +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +If you manually render fields in the template, you can render +``can_delete`` parameter with ``{{ form.DELETE }}``: + +.. code-block:: html+django + +
+ {{ formset.management_form }} + {% for form in formset %} + {{ form.id }} + + {% endfor %} +
+ + +Similarly, if the formset has the ability to order (``can_order=True``), it is possible to render it +with ``{{ form.ORDER }}``. + Using more than one formset in a view ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ diff --git a/docs/topics/forms/modelforms.txt b/docs/topics/forms/modelforms.txt index 031408a151..feebbeb239 100644 --- a/docs/topics/forms/modelforms.txt +++ b/docs/topics/forms/modelforms.txt @@ -831,6 +831,10 @@ a particular author, you could do this:: ``inlineformset_factory`` uses ``modelformset_factory`` and marks ``can_delete=True``. +.. seealso:: + + :ref:`Manually rendered can_delete and can_order `. + More than one foreign key to the same model -------------------------------------------