summaryrefslogtreecommitdiff
path: root/docs
diff options
context:
space:
mode:
authorPaul McMillan <Paul@McMillan.ws>2011-09-14 23:27:35 +0000
committerPaul McMillan <Paul@McMillan.ws>2011-09-14 23:27:35 +0000
commit50255e33053714ec3b363cf39e2d9a7f4b0ed83c (patch)
tree20236ad97b0bc389dd0b6744d0a8864229a229e3 /docs
parent67e05fcd3982a569d647f4a64f40fe9793d35cbc (diff)
Fixed #16494 by normalizing HttpResponse behavior with non-string input. HttpResponse now always converts content to string on output, regardless of input type.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@16829 bcc190cf-cafb-0310-a4f2-bffc1f526a37
Diffstat (limited to 'docs')
-rw-r--r--docs/ref/request-response.txt10
1 files changed, 6 insertions, 4 deletions
diff --git a/docs/ref/request-response.txt b/docs/ref/request-response.txt
index 88b3d771ef..e15fa5016f 100644
--- a/docs/ref/request-response.txt
+++ b/docs/ref/request-response.txt
@@ -587,7 +587,7 @@ Attributes
.. attribute:: HttpResponse.content
- A normal Python string representing the content, encoded from a Unicode
+ A string representing the content, encoded from a Unicode
object if necessary.
.. attribute:: HttpResponse.status_code
@@ -603,9 +603,11 @@ Methods
string) and MIME type. The :setting:`DEFAULT_CONTENT_TYPE` is
``'text/html'``.
- ``content`` can be an iterator or a string. If it's an iterator, it should
- return strings, and those strings will be joined together to form the
- content of the response.
+ ``content`` should be an iterator or a string. If it's an
+ iterator, it should return strings, and those strings will be
+ joined together to form the content of the response. If it is not
+ an iterator or a string, it will be converted to a string when
+ accessed.
``status`` is the `HTTP Status code`_ for the response.