From b330c74e58c46d20f97b5340f1eadc1865cfebc4 Mon Sep 17 00:00:00 2001 From: Chris McDonough Date: Tue, 19 Apr 2011 00:08:37 -0400 Subject: clarify --- docs/api/request.rst | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) (limited to 'docs/api/request.rst') diff --git a/docs/api/request.rst b/docs/api/request.rst index 80b41badb..38971295f 100644 --- a/docs/api/request.rst +++ b/docs/api/request.rst @@ -93,9 +93,9 @@ it is accessed, subsequent accesses to this request object will return the same :class:`~pyramid.response.Response` object. - The ``request.response`` API is used by renderers. A render obtains the - response object it will return from a view that uses that renderer by - accessing ``request.response``. Therefore, it's possible to use the + The ``request.response`` API can is used by renderers. A render obtains + the response object it will return from a view that uses that renderer + by accessing ``request.response``. Therefore, it's possible to use the ``request.response`` API to set up a response object with "the right" attributes (e.g. by calling ``request.response.set_cookie(...)`` or ``request.response.content_type = 'text/plain'``, etc) within a view @@ -117,6 +117,9 @@ response.content_type = 'text/plain' return response + Note that the response in this circumstance is not "global"; it still + must be returned from the view code if a renderer is not used. + .. attribute:: session If a :term:`session factory` has been configured, this attribute -- cgit v1.2.3