summaryrefslogtreecommitdiff
path: root/docs/narr/renderers.rst
diff options
context:
space:
mode:
authorChris McDonough <chrism@plope.com>2012-02-15 19:32:46 -0500
committerChris McDonough <chrism@plope.com>2012-02-15 19:32:46 -0500
commit4786cae2e7a053b01091b5e185102f9c26885b08 (patch)
tree1c2bc0e7733551abd3ad58d5369a2ac05e92f23a /docs/narr/renderers.rst
parentf9bcf47164a151587244deb3ce5334ba447e3b99 (diff)
downloadpyramid-4786cae2e7a053b01091b5e185102f9c26885b08.tar.gz
pyramid-4786cae2e7a053b01091b5e185102f9c26885b08.tar.bz2
pyramid-4786cae2e7a053b01091b5e185102f9c26885b08.zip
- The system value ``r`` is now supplied to renderers as an alias for
``request``. This means that you can now, for example, in a template, do ``r.route_url(...)`` instead of ``request.route_url(...)``. Fixes #413.
Diffstat (limited to 'docs/narr/renderers.rst')
-rw-r--r--docs/narr/renderers.rst18
1 files changed, 9 insertions, 9 deletions
diff --git a/docs/narr/renderers.rst b/docs/narr/renderers.rst
index 67354a1ed..1622f1f29 100644
--- a/docs/narr/renderers.rst
+++ b/docs/narr/renderers.rst
@@ -333,15 +333,15 @@ dictionary, an error will be raised.
Before passing keywords to the template, the keyword arguments derived from
the dictionary returned by the view are augmented. The callable object --
-whatever object was used to define the view -- will be automatically
-inserted into the set of keyword arguments passed to the template as the
-``view`` keyword. If the view callable was a class, the ``view`` keyword
-will be an instance of that class. Also inserted into the keywords passed to
-the template are ``renderer_name`` (the string used in the ``renderer``
-attribute of the directive), ``renderer_info`` (an object containing
-renderer-related information), ``context`` (the context resource of the view
-used to render the template), and ``request`` (the request passed to the view
-used to render the template).
+whatever object was used to define the view -- will be automatically inserted
+into the set of keyword arguments passed to the template as the ``view``
+keyword. If the view callable was a class, the ``view`` keyword will be an
+instance of that class. Also inserted into the keywords passed to the
+template are ``renderer_name`` (the string used in the ``renderer`` attribute
+of the directive), ``renderer_info`` (an object containing renderer-related
+information), ``context`` (the context resource of the view used to render
+the template), and ``request`` (the request passed to the view used to render
+the template). ``request`` is also available as ``r`` in Pyramid 1.3+.
Here's an example view configuration which uses a Chameleon ZPT renderer: