[1.5.x] Always use parentheses when documenting a method with no arguments.

Backport of 05d36dc06e from master.
This commit is contained in:
Baptiste Mispelon 2014-01-22 22:26:10 +01:00
parent 126af8fa7b
commit 7517768134
11 changed files with 35 additions and 35 deletions

View file

@ -324,7 +324,7 @@ a form object, and each rendering method returns a Unicode object.
``as_p()``
~~~~~~~~~~
.. method:: Form.as_p
.. method:: Form.as_p()
``as_p()`` renders the form as a series of ``<p>`` tags, with each ``<p>``
containing one field::
@ -341,7 +341,7 @@ a form object, and each rendering method returns a Unicode object.
``as_ul()``
~~~~~~~~~~~
.. method:: Form.as_ul
.. method:: Form.as_ul()
``as_ul()`` renders the form as a series of ``<li>`` tags, with each
``<li>`` containing one field. It does *not* include the ``<ul>`` or
@ -360,7 +360,7 @@ a form object, and each rendering method returns a Unicode object.
``as_table()``
~~~~~~~~~~~~~~
.. method:: Form.as_table
.. method:: Form.as_table()
Finally, ``as_table()`` outputs the form as an HTML ``<table>``. This is
exactly the same as ``print``. In fact, when you ``print`` a form object,
@ -752,7 +752,7 @@ form data *and* file data::
Testing for multipart forms
~~~~~~~~~~~~~~~~~~~~~~~~~~~
.. method:: Form.is_multipart
.. method:: Form.is_multipart()
If you're writing reusable views or templates, you may not know ahead of time
whether your form is a multipart form or not. The ``is_multipart()`` method

View file

@ -278,7 +278,7 @@ write a cleaning method that operates on the ``recipients`` field, like so::
Cleaning and validating fields that depend on each other
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
.. method:: django.forms.Form.clean
.. method:: django.forms.Form.clean()
Suppose we add another requirement to our contact form: if the ``cc_myself``
field is ``True``, the ``subject`` must contain the word ``"help"``. We are