|
@@ -378,10 +378,6 @@ help distinguish them from form-specific errors. For example,
|
|
|
<li>Articles in a set must have distinct titles.</li>
|
|
|
</ul>
|
|
|
|
|
|
-.. versionchanged:: 4.0
|
|
|
-
|
|
|
- The additional ``nonform`` class was added.
|
|
|
-
|
|
|
Validating the number of forms in a formset
|
|
|
===========================================
|
|
|
|
|
@@ -654,8 +650,6 @@ control the widget used with
|
|
|
``deletion_widget``
|
|
|
^^^^^^^^^^^^^^^^^^^
|
|
|
|
|
|
-.. versionadded:: 4.0
|
|
|
-
|
|
|
.. attribute:: BaseFormSet.deletion_widget
|
|
|
|
|
|
Default: :class:`~django.forms.CheckboxInput`
|
|
@@ -673,8 +667,6 @@ Set ``deletion_widget`` to specify the widget class to be used with
|
|
|
``get_deletion_widget``
|
|
|
^^^^^^^^^^^^^^^^^^^^^^^
|
|
|
|
|
|
-.. versionadded:: 4.0
|
|
|
-
|
|
|
.. method:: BaseFormSet.get_deletion_widget()
|
|
|
|
|
|
Override ``get_deletion_widget()`` if you need to provide a widget instance for
|
|
@@ -791,16 +783,12 @@ Formsets have the following attributes and methods associated with rendering:
|
|
|
|
|
|
.. attribute:: BaseFormSet.renderer
|
|
|
|
|
|
- .. versionadded:: 4.0
|
|
|
-
|
|
|
Specifies the :doc:`renderer </ref/forms/renderers>` to use for the
|
|
|
formset. Defaults to the renderer specified by the :setting:`FORM_RENDERER`
|
|
|
setting.
|
|
|
|
|
|
.. attribute:: BaseFormSet.template_name
|
|
|
|
|
|
- .. versionadded:: 4.0
|
|
|
-
|
|
|
The name of the template rendered if the formset is cast into a string,
|
|
|
e.g. via ``print(formset)`` or in a template via ``{{ formset }}``.
|
|
|
|
|
@@ -830,8 +818,6 @@ Formsets have the following attributes and methods associated with rendering:
|
|
|
|
|
|
.. attribute:: BaseFormSet.template_name_p
|
|
|
|
|
|
- .. versionadded:: 4.0
|
|
|
-
|
|
|
The name of the template used when calling :meth:`.as_p`. By default this
|
|
|
is ``"django/forms/formsets/p.html"``. This template renders the formset's
|
|
|
management form and then each form in the formset as per the form's
|
|
@@ -839,8 +825,6 @@ Formsets have the following attributes and methods associated with rendering:
|
|
|
|
|
|
.. attribute:: BaseFormSet.template_name_table
|
|
|
|
|
|
- .. versionadded:: 4.0
|
|
|
-
|
|
|
The name of the template used when calling :meth:`.as_table`. By default
|
|
|
this is ``"django/forms/formsets/table.html"``. This template renders the
|
|
|
formset's management form and then each form in the formset as per the
|
|
@@ -848,8 +832,6 @@ Formsets have the following attributes and methods associated with rendering:
|
|
|
|
|
|
.. attribute:: BaseFormSet.template_name_ul
|
|
|
|
|
|
- .. versionadded:: 4.0
|
|
|
-
|
|
|
The name of the template used when calling :meth:`.as_ul`. By default this
|
|
|
is ``"django/forms/formsets/ul.html"``. This template renders the formset's
|
|
|
management form and then each form in the formset as per the form's
|
|
@@ -857,8 +839,6 @@ Formsets have the following attributes and methods associated with rendering:
|
|
|
|
|
|
.. method:: BaseFormSet.get_context()
|
|
|
|
|
|
- .. versionadded:: 4.0
|
|
|
-
|
|
|
Returns the context for rendering a formset in a template.
|
|
|
|
|
|
The available context is:
|
|
@@ -867,8 +847,6 @@ Formsets have the following attributes and methods associated with rendering:
|
|
|
|
|
|
.. method:: BaseFormSet.render(template_name=None, context=None, renderer=None)
|
|
|
|
|
|
- .. versionadded:: 4.0
|
|
|
-
|
|
|
The render method is called by ``__str__`` as well as the :meth:`.as_p`,
|
|
|
:meth:`.as_ul`, and :meth:`.as_table` methods. All arguments are optional
|
|
|
and will default to:
|
|
@@ -940,10 +918,6 @@ and ``as_ul`` being available. The rendering of the formset can be customized
|
|
|
by specifying the ``template_name`` attribute, or more generally by
|
|
|
:ref:`overriding the default template <overriding-built-in-formset-templates>`.
|
|
|
|
|
|
-.. versionchanged:: 4.0
|
|
|
-
|
|
|
- Rendering of formsets was moved to the template engine.
|
|
|
-
|
|
|
.. _manually-rendered-can-delete-and-can-order:
|
|
|
|
|
|
Manually rendered ``can_delete`` and ``can_order``
|