1
0
mirror of https://github.com/django/django.git synced 2025-10-26 07:06:08 +00:00

[1.6.x] 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.

Backport of 79e1d6ebd7 from master.
This commit is contained in:
Baptiste Mispelon
2014-01-22 22:17:32 +01:00
parent 8eca53f0be
commit 6bca149af5
11 changed files with 65 additions and 65 deletions

View File

@@ -365,7 +365,7 @@ Required methods
Custom file upload handlers **must** define the following methods:
``FileUploadHandler.receive_data_chunk(self, raw_data, start)``
``FileUploadHandler.receive_data_chunk(raw_data, start)``
Receives a "chunk" of data from the file upload.
``raw_data`` is a byte string containing the uploaded data.
@@ -385,7 +385,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.
``FileUploadHandler.file_complete(self, file_size)``
``FileUploadHandler.file_complete(file_size)``
Called when a file has finished uploading.
The handler should return an ``UploadedFile`` object that will be stored
@@ -410,7 +410,7 @@ attributes:
The default is 64*2\ :sup:`10` bytes, or 64 KB.
``FileUploadHandler.new_file(self, field_name, file_name, content_type, content_length, charset)``
``FileUploadHandler.new_file(field_name, file_name, content_type, content_length, charset)``
Callback signaling that a new file upload is starting. This is called
before any data has been fed to any upload handlers.
@@ -430,10 +430,10 @@ attributes:
This method may raise a ``StopFutureHandlers`` exception to prevent
future handlers from handling this file.
``FileUploadHandler.upload_complete(self)``
``FileUploadHandler.upload_complete()``
Callback signaling that the entire upload (all files) has completed.
``FileUploadHandler.handle_raw_input(self, input_data, META, content_length, boundary, encoding)``
``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
@@ -235,7 +235,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.