summaryrefslogtreecommitdiff
path: root/docs/narr/renderers.rst
diff options
context:
space:
mode:
Diffstat (limited to 'docs/narr/renderers.rst')
-rw-r--r--docs/narr/renderers.rst23
1 files changed, 16 insertions, 7 deletions
diff --git a/docs/narr/renderers.rst b/docs/narr/renderers.rst
index f329a7af9..801741c43 100644
--- a/docs/narr/renderers.rst
+++ b/docs/narr/renderers.rst
@@ -3,10 +3,10 @@
Renderers
=========
-A view needn't *always* return a :term:`Response` object. If a view
-happens to return something which does not implement the Pyramid
-Response interface, :app:`Pyramid` will attempt to use a
-:term:`renderer` to construct a response. For example:
+A view callable needn't *always* return a :term:`Response` object. If a view
+happens to return something which does not implement the Pyramid Response
+interface, :app:`Pyramid` will attempt to use a :term:`renderer` to construct
+a response. For example:
.. code-block:: python
:linenos:
@@ -228,6 +228,9 @@ Views which use the JSON renderer can vary non-body response attributes by
using the api of the ``request.response`` attribute. See
:ref:`request_response_attr`.
+.. index::
+ pair: renderer; JSONP
+
.. _jsonp_renderer:
JSONP Renderer
@@ -522,9 +525,6 @@ people with older code bases.
returning various values in the ``response_headerlist``, this is purely a
convenience.
-.. index::
- single: renderer (adding)
-
.. _adding_and_overriding_renderers:
Adding and Changing Renderers
@@ -550,6 +550,9 @@ The first argument is the renderer name. The second argument is a reference
to an implementation of a :term:`renderer factory` or a :term:`dotted Python
name` referring to such an object.
+.. index::
+ pair: renderer; adding
+
.. _adding_a_renderer:
Adding a New Renderer
@@ -676,6 +679,9 @@ ending with ``.jinja2`` in its ``renderer`` value. The ``name`` passed
to the ``MyJinja2Renderer`` constructor will be the full value that was
set as ``renderer=`` in the view configuration.
+.. index::
+ pair: renderer; changing
+
Changing an Existing Renderer
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
@@ -715,6 +721,9 @@ the ``name`` attribute to the renderer tag:
config.add_renderer(None, 'mypackage.json_renderer_factory')
+.. index::
+ pair: renderer; overriding at runtime
+
Overriding A Renderer At Runtime
--------------------------------