diff options
Diffstat (limited to 'docs')
| -rw-r--r-- | docs/narr/renderers.rst | 2 | ||||
| -rw-r--r-- | docs/whatsnew-1.3.rst | 7 |
2 files changed, 6 insertions, 3 deletions
diff --git a/docs/narr/renderers.rst b/docs/narr/renderers.rst index 1622f1f29..1f1b1943b 100644 --- a/docs/narr/renderers.rst +++ b/docs/narr/renderers.rst @@ -341,7 +341,7 @@ 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+. +the template). ``request`` is also available as ``req`` in Pyramid 1.3+. Here's an example view configuration which uses a Chameleon ZPT renderer: diff --git a/docs/whatsnew-1.3.rst b/docs/whatsnew-1.3.rst index c4bde2b54..a27ef6af9 100644 --- a/docs/whatsnew-1.3.rst +++ b/docs/whatsnew-1.3.rst @@ -284,9 +284,12 @@ Minor Feature Additions something like "AttributeError: 'NoneType' object has no attribute 'rfind'". -- The system value ``r`` is now supplied to renderers as an alias for +- The system value ``req`` 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(...)``. + ``req.route_url(...)`` instead of ``request.route_url(...)``. This is + purely a change to reduce the amount of typing required to use request + methods and attributes from within templates. The value ``request`` is + still available too, this is just an alternative. Backwards Incompatibilities --------------------------- |
