summaryrefslogtreecommitdiff
path: root/docs
diff options
context:
space:
mode:
authorChris McDonough <chrism@agendaless.com>2009-12-10 03:17:47 +0000
committerChris McDonough <chrism@agendaless.com>2009-12-10 03:17:47 +0000
commit16cdd27071ef91a56150f1d47d1a51a141f6c55f (patch)
treecd82a62a71791673fc975beb58febc4495bf36c4 /docs
parent1fa6836c38198c6ebd5a3e2fcd104f60295c3349 (diff)
downloadpyramid-16cdd27071ef91a56150f1d47d1a51a141f6c55f.tar.gz
pyramid-16cdd27071ef91a56150f1d47d1a51a141f6c55f.tar.bz2
pyramid-16cdd27071ef91a56150f1d47d1a51a141f6c55f.zip
Fix overriding renderers rendering.
Diffstat (limited to 'docs')
-rw-r--r--docs/narr/views.rst25
1 files changed, 18 insertions, 7 deletions
diff --git a/docs/narr/views.rst b/docs/narr/views.rst
index 913f5cd88..e4eba6a0b 100644
--- a/docs/narr/views.rst
+++ b/docs/narr/views.rst
@@ -1604,23 +1604,34 @@ overriding a renderer is accomplished via :term:`ZCML` or via
imperative configuration.
For example, to add a renderer which renders views which have a
-``renderer`` attribute that is a path that ends in ``.jinja``::
+``renderer`` attribute that is a path that ends in ``.jinja2``:
.. topic:: Via ZCML
- <renderer
- name=".jinja"
- factory="my.package.MyJinja2Renderer"/>
+ .. code-block:: xml
+ :linenos:
+
+ <renderer
+ name=".jinja2"
+ factory="my.package.MyJinja2Renderer"/>
The ``factory`` attribute is a dotted Python name that must point
to an implementation of a :term:`renderer`.
- The ``name`` attribute
+ The ``name`` attribute is the renderer name.
.. topic:: Via Imperative Configuration
- from my.package import MyJinja2Renderer
- config.add_renderer('.jinja', MyJinja2Renderer)
+ .. code-block:: python
+ :linenos:
+
+ from my.package import MyJinja2Renderer
+ config.add_renderer('.jinja2', MyJinja2Renderer)
+
+ The first argument is the renderer name.
+
+ The second argument is a reference to an to an implementation of a
+ :term:`renderer`.
A renderer implementation is usually a class which has the following
interface: