summaryrefslogtreecommitdiff
path: root/docs
diff options
context:
space:
mode:
authorAymeric Augustin <aymeric.augustin@m4x.org>2013-05-19 12:58:13 +0200
committerAymeric Augustin <aymeric.augustin@m4x.org>2013-05-19 13:14:54 +0200
commitcb86f707a04e5635817d5f37a1443f9bf7d6af21 (patch)
treec44ae6e62aa569ba1769949b8d9f38b6fecc0bc9 /docs
parent3129d190714216cd83d2494a88f537699a42375f (diff)
Fixed #12747 -- Made reason phrases customizable.
Diffstat (limited to 'docs')
-rw-r--r--docs/ref/request-response.txt27
-rw-r--r--docs/releases/1.6.txt2
2 files changed, 23 insertions, 6 deletions
diff --git a/docs/ref/request-response.txt b/docs/ref/request-response.txt
index fc26eabf1a..10c3f32e60 100644
--- a/docs/ref/request-response.txt
+++ b/docs/ref/request-response.txt
@@ -616,7 +616,13 @@ Attributes
.. attribute:: HttpResponse.status_code
- The `HTTP Status code`_ for the response.
+ The `HTTP status code`_ for the response.
+
+.. attribute:: HttpResponse.reason_phrase
+
+ .. versionadded:: 1.6
+
+ The HTTP reason phrase for the response.
.. attribute:: HttpResponse.streaming
@@ -628,7 +634,7 @@ Attributes
Methods
-------
-.. method:: HttpResponse.__init__(content='', content_type=None, status=200)
+.. method:: HttpResponse.__init__(content='', content_type=None, status=200, reason=None)
Instantiates an ``HttpResponse`` object with the given page content and
content type.
@@ -646,8 +652,12 @@ Methods
Historically, this parameter was called ``mimetype`` (now deprecated).
- ``status`` is the `HTTP Status code`_ for the response.
+ ``status`` is the `HTTP status code`_ for the response.
+
+ .. versionadded:: 1.6
+ ``reason`` is the HTTP response phrase. If not provided, a default phrase
+ will be used.
.. method:: HttpResponse.__setitem__(header, value)
@@ -727,8 +737,7 @@ Methods
This method makes an :class:`HttpResponse` instance a file-like object.
-.. _HTTP Status code: http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html#sec10
-
+.. _HTTP status code: http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html#sec10
.. _ref-httpresponse-subclasses:
@@ -851,7 +860,13 @@ Attributes
.. attribute:: HttpResponse.status_code
- The `HTTP Status code`_ for the response.
+ The `HTTP status code`_ for the response.
+
+.. attribute:: HttpResponse.reason_phrase
+
+ .. versionadded:: 1.6
+
+ The HTTP reason phrase for the response.
.. attribute:: HttpResponse.streaming
diff --git a/docs/releases/1.6.txt b/docs/releases/1.6.txt
index 0eab8540b0..b4668c38d0 100644
--- a/docs/releases/1.6.txt
+++ b/docs/releases/1.6.txt
@@ -241,6 +241,8 @@ Minor features
* The ``choices`` argument to model fields now accepts an iterable of iterables
instead of requiring an iterable of lists or tuples.
+* The reason phrase can be customized in HTTP responses.
+
Backwards incompatible changes in 1.6
=====================================