Don't show self in the list of arguments of a method.

This is consistent with Python's official documentation
and it's a sphinx recommendation too[1].

[1] http://sphinx-doc.org/markup/desc.html#dir-method

Refs #21855.
This commit is contained in:
Baptiste Mispelon 2014-01-22 22:17:32 +01:00
parent 5f9790072d
commit 79e1d6ebd7
11 changed files with 71 additions and 71 deletions

View file

@ -167,7 +167,7 @@ As we can see, ``formset.errors`` is a list whose entries correspond to the
forms in the formset. Validation was performed for each of the two forms, and
the expected error message appears for the second item.
.. method:: BaseFormSet.total_error_count(self)
.. method:: BaseFormSet.total_error_count()
.. versionadded:: 1.6

View file

@ -386,7 +386,7 @@ Required methods
Custom file upload handlers **must** define the following methods:
.. method:: FileUploadHandler.receive_data_chunk(self, raw_data, start)
.. method:: FileUploadHandler.receive_data_chunk(raw_data, start)
Receives a "chunk" of data from the file upload.
@ -407,7 +407,7 @@ Custom file upload handlers **must** define the following methods:
If you raise a ``StopUpload`` or a ``SkipFile`` exception, the upload
will abort or the file will be completely skipped.
.. method:: FileUploadHandler.file_complete(self, file_size)
.. method:: FileUploadHandler.file_complete(file_size)
Called when a file has finished uploading.
@ -434,7 +434,7 @@ attributes:
The default is 64*2\ :sup:`10` bytes, or 64 KB.
.. method:: FileUploadHandler.new_file(self, field_name, file_name, content_type, content_length, charset, content_type_extra)
.. method:: FileUploadHandler.new_file(field_name, file_name, content_type, content_length, charset, content_type_extra)
Callback signaling that a new file upload is starting. This is called
before any data has been fed to any upload handlers.
@ -463,11 +463,11 @@ attributes:
The ``content_type_extra`` parameter was added.
.. method:: FileUploadHandler.upload_complete(self)
.. method:: FileUploadHandler.upload_complete()
Callback signaling that the entire upload (all files) has completed.
.. method:: FileUploadHandler.handle_raw_input(self, input_data, META, content_length, boundary, encoding)
.. method:: FileUploadHandler.handle_raw_input(input_data, META, content_length, boundary, encoding)
Allows the handler to completely override the parsing of the raw
HTTP input.

View file

@ -85,7 +85,7 @@ Python class that defines one or more of the following methods:
``process_request``
-------------------
.. method:: process_request(self, request)
.. method:: process_request(request)
``request`` is an :class:`~django.http.HttpRequest` object.
@ -106,7 +106,7 @@ return the result.
``process_view``
----------------
.. method:: process_view(self, request, view_func, view_args, view_kwargs)
.. method:: process_view(request, view_func, view_args, view_kwargs)
``request`` is an :class:`~django.http.HttpRequest` object. ``view_func`` is
the Python function that Django is about to use. (It's the actual function
@ -146,7 +146,7 @@ view; it'll apply response middleware to that
``process_template_response``
-----------------------------
.. method:: process_template_response(self, request, response)
.. method:: process_template_response(request, response)
``request`` is an :class:`~django.http.HttpRequest` object. ``response`` is
the :class:`~django.template.response.TemplateResponse` object (or equivalent)
@ -173,7 +173,7 @@ includes ``process_template_response()``.
``process_response``
--------------------
.. method:: process_response(self, request, response)
.. method:: process_response(request, response)
``request`` is an :class:`~django.http.HttpRequest` object. ``response`` is
the :class:`~django.http.HttpResponse` or
@ -230,7 +230,7 @@ must test for streaming responses and adjust their behavior accordingly::
``process_exception``
---------------------
.. method:: process_exception(self, request, exception)
.. method:: process_exception(request, exception)
``request`` is an :class:`~django.http.HttpRequest` object. ``exception`` is an
``Exception`` object raised by the view function.

View file

@ -1241,7 +1241,7 @@ your test suite.
failure. Similar to unittest's :meth:`~unittest.TestCase.assertRaisesRegexp`
with the difference that ``expected_message`` isn't a regular expression.
.. method:: SimpleTestCase.assertFieldOutput(self, fieldclass, valid, invalid, field_args=None, field_kwargs=None, empty_value=u'')
.. method:: SimpleTestCase.assertFieldOutput(fieldclass, valid, invalid, field_args=None, field_kwargs=None, empty_value=u'')
Asserts that a form field behaves correctly with various inputs.