1
0
mirror of https://github.com/django/django.git synced 2025-10-24 06:06:09 +00:00

[1.8.x] Clarified that the test client response content attribute is bytes.

Backport of 484edc81c1 from master
This commit is contained in:
薛丞宏
2015-10-23 21:12:49 +08:00
committed by Tim Graham
parent 244b7c930f
commit 415837543e
3 changed files with 6 additions and 6 deletions

View File

@@ -54,7 +54,7 @@ Web pages::
200
>>> response = c.get('/customer/details/')
>>> response.content
'<!DOCTYPE html...'
b'<!DOCTYPE html...'
As this example suggests, you can instantiate ``Client`` from within a session
of the Python interactive interpreter.
@@ -417,8 +417,8 @@ Specifically, a ``Response`` object has the following attributes:
.. attribute:: content
The body of the response, as a string. This is the final page content as
rendered by the view, or any error message.
The body of the response, as a bytestring. This is the final page
content as rendered by the view, or any error message.
.. attribute:: context