diff options
| author | Russell Keith-Magee <russell@keith-magee.com> | 2008-07-12 06:16:42 +0000 |
|---|---|---|
| committer | Russell Keith-Magee <russell@keith-magee.com> | 2008-07-12 06:16:42 +0000 |
| commit | 4aa6c5725137dc47e3baf4d9df94352e529fa3f4 (patch) | |
| tree | 42241aa9d41bd74275be90d2363b01730a4fa6d9 /docs | |
| parent | b038abe1fe0c5abc2f503eb8e464087349766c1c (diff) | |
Fixed #7583 -- Corrected the testing docs that referred to the defunct headers attribute of the response. Added a test case to validate (and document) the new behavior. Thanks to Malcolm for the report.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@7900 bcc190cf-cafb-0310-a4f2-bffc1f526a37
Diffstat (limited to 'docs')
| -rw-r--r-- | docs/testing.txt | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/docs/testing.txt b/docs/testing.txt index 0b18545efb..37f3f7f730 100644 --- a/docs/testing.txt +++ b/docs/testing.txt @@ -600,8 +600,6 @@ Specifically, a ``Response`` object has the following attributes: ``context`` will be a list of ``Context`` objects, in the order in which they were rendered. - ``headers`` The HTTP headers of the response. This is a dictionary. - ``request`` The request data that stimulated the response. ``status_code`` The HTTP status of the response, as an integer. See @@ -619,6 +617,10 @@ Specifically, a ``Response`` object has the following attributes: which they were rendered. =============== ========================================================== +You can also use dictionary syntax on the response object to query the value +of any settings in the HTTP headers. For example, you could determine the +content type of a response using ``response['Content-Type']``. + .. _RFC2616: http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html .. _template inheritance: ../templates/#template-inheritance |
