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:59:55 +0100
commit6bca149af5b8e2d6fb6fe19bdb53904f07248033 (patch)
tree7a121ab9550a1ac60855296a55426c5719de9fd1 /docs/topics/http
parent8eca53f0bef783e5c11877fe18a6651543605af1 (diff)
[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 79e1d6ebd70898d514a44b85648e3d24104c4243 from master.
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 fb6d20583f..211ffa1e5a 100644
--- a/docs/topics/http/file-uploads.txt
+++ b/docs/topics/http/file-uploads.txt
@@ -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.
diff --git a/docs/topics/http/middleware.txt b/docs/topics/http/middleware.txt
index 6bb7ccb8f8..56e9879291 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
@@ -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.