summaryrefslogtreecommitdiff
path: root/docs/narr/renderers.rst
diff options
context:
space:
mode:
authorMichael Merickel <michael@digitalartefacts.com>2013-10-19 02:04:02 -0500
committerMichael Merickel <michael@digitalartefacts.com>2013-10-19 02:04:02 -0500
commitc137eccf36aed3200592da0b170bc7f3ba1313b6 (patch)
tree3599f91b8c4863613be977ce847e5739b1f34804 /docs/narr/renderers.rst
parent8385569b371a2586acf1680937ca656136c2502c (diff)
parent3acee31f86bcde8abbb4e63715afc5ca67976eaf (diff)
downloadpyramid-c137eccf36aed3200592da0b170bc7f3ba1313b6.tar.gz
pyramid-c137eccf36aed3200592da0b170bc7f3ba1313b6.tar.bz2
pyramid-c137eccf36aed3200592da0b170bc7f3ba1313b6.zip
Merge branch 'master' into feature.signed-cookie-session
Diffstat (limited to 'docs/narr/renderers.rst')
-rw-r--r--docs/narr/renderers.rst22
1 files changed, 13 insertions, 9 deletions
diff --git a/docs/narr/renderers.rst b/docs/narr/renderers.rst
index 3059aef35..740c81555 100644
--- a/docs/narr/renderers.rst
+++ b/docs/narr/renderers.rst
@@ -49,15 +49,19 @@ Writing View Callables Which Use a Renderer
-------------------------------------------
As we've seen, a view callable needn't always return a Response object.
-Instead, it may return an arbitrary Python object, with the expectation
-that a :term:`renderer` will convert that object into a response instance on
-your behalf. Some renderers use a templating system; other renderers use
-object serialization techniques.
-
-View configuration can vary the renderer associated with a view callable via
-the ``renderer`` attribute. For example, this call to
-:meth:`~pyramid.config.Configurator.add_view` associates the ``json`` renderer
-with a view callable:
+Instead, it may return an arbitrary Python object, with the expectation that
+a :term:`renderer` will convert that object into a response instance on your
+behalf. Some renderers use a templating system; other renderers use object
+serialization techniques. In practice, renderers obtain application data
+values from Python dictionaries so, in practice, view callables which use
+renderers return Python dictionaries.
+
+View callables can :ref:`explicitly call <example_render_to_response_call>`
+renderers, but typically don't. Instead view configuration declares the
+renderer used to render a view callable's results. This is done with the
+``renderer`` attribute. For example, this call to
+:meth:`~pyramid.config.Configurator.add_view` associates the ``json``
+renderer with a view callable:
.. code-block:: python