mirror of
https://github.com/django/django.git
synced 2025-08-04 10:59:45 +00:00
[1.5.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:
parent
ebed014950
commit
126af8fa7b
9 changed files with 60 additions and 60 deletions
|
@ -357,7 +357,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.
|
||||
|
@ -377,7 +377,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
|
||||
|
@ -402,7 +402,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.
|
||||
|
||||
|
@ -422,10 +422,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.
|
||||
|
||||
|
|
|
@ -60,7 +60,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. This method is
|
||||
called on each request, before Django decides which view to execute.
|
||||
|
@ -78,7 +78,7 @@ Response middleware is always called on every response.
|
|||
``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
|
||||
|
@ -117,7 +117,7 @@ middleware is always called on every response.
|
|||
``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 a
|
||||
subclass of :class:`~django.template.response.SimpleTemplateResponse` (e.g.
|
||||
|
@ -146,7 +146,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` object returned by a Django view.
|
||||
|
@ -187,7 +187,7 @@ Middleware may wrap it in a new generator, but must not consume it.
|
|||
``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.
|
||||
|
|
|
@ -1488,7 +1488,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'')
|
||||
|
||||
.. versionadded:: 1.4
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue