  --------------
  
  .. method:: Form.as_table()
  
  Finally, ``as_table()`` renders the form using the template assigned to the
  forms ``template_name_table`` attribute, by default this template is
  ``'django/forms/table.html'``. This template outputs the form as an HTML
  ``<table>``::
  
      >>> f = ContactForm()
      >>> f.as_table()
      '<tr><th><label for="id_subject">Subject:</label></th><td><input id="id_subject" type="text" name="subject" maxlength="100" required></td></tr>\n<tr><th><label for="id_message">Message:</label></th><td><input type="text" name="message" id="id_message" required></td></tr>\n<tr><th><label for="id_sender">Sender:</label></th><td><input type="email" name="sender" id="id_sender" required></td></tr>\n<tr><th><label for="id_cc_myself">Cc myself:</label></th><td><input type="checkbox" name="cc_myself" id="id_cc_myself"></td></tr>'
      >>> print(f)
 
</s> remove ``as_p()`` renders the form using the template assigned to the forms
``template_name_p`` attribute, by default this template is
``'django/forms/p.html'``. This template renders the form as a series of
``<p>`` tags, with each ``<p>`` containing one field::
 </s> add ``as_p()`` renders the form as a series of ``<p>`` tags, with each ``<p>``
containing one field:: </s> remove ``as_ul()`` renders the form using the template assigned to the forms
``template_name_ul`` attribute, by default this template is
``'django/forms/ul.html'``. This template renders the form as a series of
``<li>`` tags, with each ``<li>`` containing one field. It does *not* include
the ``<ul>`` or ``</ul>``, so that you can specify any HTML attributes on the
``<ul>`` for flexibility::
 </s> add ``as_ul()`` renders the form as a series of ``<li>`` tags, with each ``<li>``
containing one field. It does *not* include the ``<ul>`` or ``</ul>``, so that
you can specify any HTML attributes on the ``<ul>`` for flexibility:: </s> remove --------------
 </s> add ~~~~~~~~~~~~~~

.. attribute:: Form.template_name_table

The template used by ``as_table()``. Default: ``'django/forms/table.html'``. </s> remove ----------
 </s> add ~~~~~~~~~~

.. attribute:: Form.template_name_p

The template used by ``as_p()``. Default: ``'django/forms/p.html'``. </s> remove ``get_context()``
-----------------

.. versionadded:: 4.0

.. method:: Form.get_context()

Return context for form rendering in a template.

The available context is:

* ``form``: The bound form.
* ``fields``: All bound fields, except the hidden fields.
* ``hidden_fields``: All hidden bound fields.
* ``errors``: All non field related or hidden field related form errors.

``render()``
------------

.. versionadded:: 4.0

.. method:: Form.render(template_name=None, context=None, renderer=None)

The render method is called by ``__str__`` as well as the
:meth:`.Form.as_table`, :meth:`.Form.as_p`, and :meth:`.Form.as_ul` methods.
All arguments are optional and default to:

* ``template_name``: :attr:`.Form.template_name`
* ``context``: Value returned by :meth:`.Form.get_context`
* ``renderer``: Value returned by :attr:`.Form.default_renderer`

 </s> add 
``as_table()`` renders the form as an HTML ``<table>``::
  --------------
  
  .. method:: Form.as_table()
  
``as_table()`` renders the form as an HTML ``<table>``::
``as_table()`` renders the form as an HTML ``<table>``::
``as_table()`` renders the form as an HTML ``<table>``::
``as_table()`` renders the form as an HTML ``<table>``::
  
      >>> f = ContactForm()
      >>> f.as_table()
      '<tr><th><label for="id_subject">Subject:</label></th><td><input id="id_subject" type="text" name="subject" maxlength="100" required></td></tr>\n<tr><th><label for="id_message">Message:</label></th><td><input type="text" name="message" id="id_message" required></td></tr>\n<tr><th><label for="id_sender">Sender:</label></th><td><input type="email" name="sender" id="id_sender" required></td></tr>\n<tr><th><label for="id_cc_myself">Cc myself:</label></th><td><input type="checkbox" name="cc_myself" id="id_cc_myself"></td></tr>'
      >>> print(f)
keep keep keep keep replace replace replace replace keep keep keep keep keep
 Refs #32339 -- Restructured outputting HTML form docs.

In the topic doc, promoted the Reusable form templates section.

In the reference, re-grouped and promoted the default __str__()
rendering path, and then gathered the various as_*() helpers
subsequently.

Thanks to David Smith for review. 
docs/ref/forms/api.txt