summaryrefslogtreecommitdiff
path: root/docs/topics/http
diff options
context:
space:
mode:
authorBaptiste Mispelon <bmispelon@gmail.com>2014-01-22 22:17:32 +0100
committerBaptiste Mispelon <bmispelon@gmail.com>2014-01-22 22:17:32 +0100
commit79e1d6ebd70898d514a44b85648e3d24104c4243 (patch)
tree68e29f7043e270c4716f7fc8a3c53ae6ba92bf0f /docs/topics/http
parent5f9790072d52443aff9a0e04f1552f1e29489521 (diff)
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.
Diffstat (limited to 'docs/topics/http')
-rw-r--r--docs/topics/http/file-uploads.txt10
-rw-r--r--docs/topics/http/middleware.txt10
2 files changed, 10 insertions, 10 deletions
diff --git a/docs/topics/http/file-uploads.txt b/docs/topics/http/file-uploads.txt
index 94415d03c3..4a2525bffe 100644
--- a/docs/topics/http/file-uploads.txt
+++ b/docs/topics/http/file-uploads.txt
@@ -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.
diff --git a/docs/topics/http/middleware.txt b/docs/topics/http/middleware.txt
index da3f7ce4c1..b18573f002 100644
--- a/docs/topics/http/middleware.txt
+++ b/docs/topics/http/middleware.txt
@@ -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.