diff options
| author | Chris McDonough <chrism@plope.com> | 2011-06-14 05:34:47 -0400 |
|---|---|---|
| committer | Chris McDonough <chrism@plope.com> | 2011-06-14 05:34:47 -0400 |
| commit | 31d78e7ea78343dcf9405a86d4d817a1efda16dc (patch) | |
| tree | 53762e1b87ee7e03e2cdb12cc5b3aee7ff4b942c /docs/api/request.rst | |
| parent | a4d5525cdbb6b7e614939b20a340b989258779ca (diff) | |
| parent | cecfc9e459166f3de13141954a61eaa2d6c905f2 (diff) | |
| download | pyramid-31d78e7ea78343dcf9405a86d4d817a1efda16dc.tar.gz pyramid-31d78e7ea78343dcf9405a86d4d817a1efda16dc.tar.bz2 pyramid-31d78e7ea78343dcf9405a86d4d817a1efda16dc.zip | |
merge httpexception-utils branch
Diffstat (limited to 'docs/api/request.rst')
| -rw-r--r-- | docs/api/request.rst | 33 |
1 files changed, 18 insertions, 15 deletions
diff --git a/docs/api/request.rst b/docs/api/request.rst index 8cb424658..27ce395ac 100644 --- a/docs/api/request.rst +++ b/docs/api/request.rst @@ -107,7 +107,9 @@ return {'text':'Value that will be used by the renderer'} Mutations to this response object will be preserved in the response sent - to the client after rendering. + to the client after rendering. For more information about using + ``request.response`` in conjunction with a renderer, see + :ref:`request_response_attr`. Non-renderer code can also make use of request.response instead of creating a response "by hand". For example, in view code:: @@ -162,20 +164,21 @@ .. attribute:: response_* - .. warning:: As of Pyramid 1.1, assignment to ``response_*`` attrs are - deprecated. Assigning to one will cause a deprecation warning to be - emitted. Instead of assigning ``response_*`` attributes to the - request, use API of the the :attr:`pyramid.request.Request.response` - object (exposed to view code as ``request.response``) to influence - response behavior. - - You can set attributes on a :class:`pyramid.request.Request` which will - influence the behavor of *rendered* responses (views which use a - :term:`renderer` and which don't directly return a response). These - attributes begin with ``response_``, such as ``response_headerlist``. If - you need to influence response values from a view that uses a renderer - (such as the status code, a header, the content type, etc) see, - :ref:`response_prefixed_attrs`. + In Pyramid 1.0, you could set attributes on a + :class:`pyramid.request.Request` which influenced the behavor of + *rendered* responses (views which use a :term:`renderer` and which + don't directly return a response). These attributes began with + ``response_``, such as ``response_headerlist``. If you needed to + influence response values from a view that uses a renderer (such as the + status code, a header, the content type, etc) you would set these + attributes. See :ref:`response_prefixed_attrs` for further discussion. + As of Pyramid 1.1, assignment to ``response_*`` attrs are deprecated. + Assigning to one is still supported but will cause a deprecation + warning to be emitted, and eventually the feature will be removed. For + new code, instead of assigning ``response_*`` attributes to the + request, use API of the the :attr:`pyramid.request.Request.response` + object (exposed to view code as ``request.response``) to influence + rendered response behavior. .. note:: |
