From 6a1a136a646fb9e5faafac902b67cfdc32497d72 Mon Sep 17 00:00:00 2001 From: Casey Duncan Date: Sun, 12 Dec 2010 11:10:14 -0700 Subject: Add sentence to explain the implications of render_to_response returing a response --- docs/narr/templates.rst | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'docs/narr/templates.rst') diff --git a/docs/narr/templates.rst b/docs/narr/templates.rst index 803758b82..16bb2d493 100644 --- a/docs/narr/templates.rst +++ b/docs/narr/templates.rst @@ -124,11 +124,12 @@ configured special :term:`renderer globals`, make sure to pass ``request`` as a keyword argument in every call to to a ``pyramid.renderers.render_*`` function. -Every view must return a :term:`response` object (except for views -which use a :term:`renderer` named via view configuration, which we'll +Every view must return a :term:`response` object, except for views +which use a :term:`renderer` named via view configuration (which we'll see shortly). The :func:`pyramid.renderers.render_to_response` function is a shortcut function that actually returns a response -object. +object. This allows the example view above to simply return the result +of its call to ``render_to_response()`` directly. Obviously not all APIs you might call to get respnonse data will return a response object. If you call a "response-ignorant" API that -- cgit v1.2.3