mirror of https://github.com/django/django.git
[4.2.x] Refs #32339 -- Doc'd BaseFormSet.as_div()
Backport of 4038a8df0b
from main
This commit is contained in:
parent
389318d118
commit
ce10686604
|
@ -904,14 +904,20 @@ Formsets have the following attributes and methods associated with rendering:
|
||||||
|
|
||||||
.. method:: BaseFormSet.render(template_name=None, context=None, renderer=None)
|
.. method:: BaseFormSet.render(template_name=None, context=None, renderer=None)
|
||||||
|
|
||||||
The render method is called by ``__str__`` as well as the :meth:`.as_p`,
|
The render method is called by ``__str__`` as well as the :meth:`.as_div`,
|
||||||
:meth:`.as_ul`, and :meth:`.as_table` methods. All arguments are optional
|
:meth:`.as_p`, :meth:`.as_ul`, and :meth:`.as_table` methods. All arguments
|
||||||
and will default to:
|
are optional and will default to:
|
||||||
|
|
||||||
* ``template_name``: :attr:`.template_name`
|
* ``template_name``: :attr:`.template_name`
|
||||||
* ``context``: Value returned by :meth:`.get_context`
|
* ``context``: Value returned by :meth:`.get_context`
|
||||||
* ``renderer``: Value returned by :attr:`.renderer`
|
* ``renderer``: Value returned by :attr:`.renderer`
|
||||||
|
|
||||||
|
.. method:: BaseFormSet.as_div()
|
||||||
|
|
||||||
|
.. versionadded:: 4.1
|
||||||
|
|
||||||
|
Renders the formset with the :attr:`.template_name_div` template.
|
||||||
|
|
||||||
.. method:: BaseFormSet.as_p()
|
.. method:: BaseFormSet.as_p()
|
||||||
|
|
||||||
Renders the formset with the :attr:`.template_name_p` template.
|
Renders the formset with the :attr:`.template_name_p` template.
|
||||||
|
|
Loading…
Reference in New Issue