diff options
| author | Casey Duncan <casey.duncan@gmail.com> | 2010-12-12 11:10:14 -0700 |
|---|---|---|
| committer | Casey Duncan <casey.duncan@gmail.com> | 2010-12-12 11:10:14 -0700 |
| commit | 6a1a136a646fb9e5faafac902b67cfdc32497d72 (patch) | |
| tree | 5c940c94fd12b4d1e43d3b1c78e20b73ce9b3412 /docs/narr/templates.rst | |
| parent | 818768764a69198bd938cb268ea1c584a7007f52 (diff) | |
| download | pyramid-6a1a136a646fb9e5faafac902b67cfdc32497d72.tar.gz pyramid-6a1a136a646fb9e5faafac902b67cfdc32497d72.tar.bz2 pyramid-6a1a136a646fb9e5faafac902b67cfdc32497d72.zip | |
Add sentence to explain the implications of render_to_response returing a response
Diffstat (limited to 'docs/narr/templates.rst')
| -rw-r--r-- | docs/narr/templates.rst | 7 |
1 files changed, 4 insertions, 3 deletions
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 |
