summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChris McDonough <chrism@plope.com>2012-03-21 18:58:31 -0400
committerChris McDonough <chrism@plope.com>2012-03-21 18:58:31 -0400
commit036a633c5414887cc7c080c9d2ab813f539bd14a (patch)
tree19d19b946405e6add8cd7886190948978e42f5a4
parent731d5f571c2b78a885e176abfd0c16f78ec6bc02 (diff)
parenteb33944d0d861bbb3aebdf069cce64f8c1c3faef (diff)
downloadpyramid-036a633c5414887cc7c080c9d2ab813f539bd14a.tar.gz
pyramid-036a633c5414887cc7c080c9d2ab813f539bd14a.tar.bz2
pyramid-036a633c5414887cc7c080c9d2ab813f539bd14a.zip
Merge branch '1.3-branch'
-rw-r--r--CHANGES.txt4
-rw-r--r--docs/conf.py2
-rw-r--r--docs/narr/templates.rst49
-rw-r--r--setup.py2
4 files changed, 37 insertions, 20 deletions
diff --git a/CHANGES.txt b/CHANGES.txt
index 916deb009..e978f61f0 100644
--- a/CHANGES.txt
+++ b/CHANGES.txt
@@ -1,5 +1,5 @@
-Next release
-============
+1.3 (2012-03-21)
+================
Bug Fixes
---------
diff --git a/docs/conf.py b/docs/conf.py
index d694b2151..5254561ba 100644
--- a/docs/conf.py
+++ b/docs/conf.py
@@ -80,7 +80,7 @@ copyright = '%s, Agendaless Consulting' % datetime.datetime.now().year
# other places throughout the built documents.
#
# The short X.Y version.
-version = '1.3b3'
+version = '1.3'
# The full version, including alpha/beta/rc tags.
release = version
diff --git a/docs/narr/templates.rst b/docs/narr/templates.rst
index ed700f7b4..9db0b1c4d 100644
--- a/docs/narr/templates.rst
+++ b/docs/narr/templates.rst
@@ -253,16 +253,26 @@ System Values Used During Rendering
When a template is rendered using
:func:`~pyramid.renderers.render_to_response` or
-:func:`~pyramid.renderers.render`, the renderer representing the
-template will be provided with a number of *system* values. These
-values are provided in a dictionary to the renderer and include:
-
-``context``
- The current :app:`Pyramid` context if ``request`` was provided as
- a keyword argument, or ``None``.
+:func:`~pyramid.renderers.render`, or a ``renderer=`` argument to view
+configuration (see :ref:`templates_used_as_renderers`), the renderer
+representing the template will be provided with a number of *system* values.
+These values are provided to the template:
``request``
- The request provided as a keyword argument.
+ The value provided as the ``request`` keyword argument to
+ ``render_to_response`` or ``render`` *or* the request object passed to the
+ view when the ``renderer=`` argument to view configuration is being used to
+ render the template.
+
+``req``
+ An alias for ``request``.
+
+``context``
+ The current :app:`Pyramid` :term:`context` if ``request`` was provided as a
+ keyword argument to ``render_to_response`` or ``render``, or ``None`` if
+ the ``request`` keyword argument was not provided. This value will always
+ be provided if the template is rendered as the result of a ``renderer=``
+ argument to view configuration being used.
``renderer_name``
The renderer name used to perform the rendering,
@@ -270,17 +280,24 @@ values are provided in a dictionary to the renderer and include:
``renderer_info``
An object implementing the :class:`pyramid.interfaces.IRendererInfo`
- interface. Basically, an object with the following attributes:
- ``name``, ``package`` and ``type``.
+ interface. Basically, an object with the following attributes: ``name``,
+ ``package`` and ``type``.
+
+``view``
+ The view callable object that was used to render this template. If the
+ view callable is a method of a class-based view, this will be an instance
+ of the class that the method was defined on. If the view callable is a
+ function or instance, it will be that function or instance. Note that this
+ value will only be automatically present when a template is rendered as a
+ result of a ``renderer=`` argument; it will be ``None`` when the
+ ``render_to_response`` or ``render`` APIs are used.
-You can define more values which will be passed to every template
-executed as a result of rendering by defining :term:`renderer
-globals`.
+You can define more values which will be passed to every template executed as
+a result of rendering by defining :term:`renderer globals`.
What any particular renderer does with these system values is up to the
-renderer itself, but most template renderers, including Chameleon and
-Mako renderers, make these names available as top-level template
-variables.
+renderer itself, but most template renderers, including Chameleon and Mako
+renderers, make these names available as top-level template variables.
.. index::
pair: renderer; templates
diff --git a/setup.py b/setup.py
index d04fbed3a..b4179bba9 100644
--- a/setup.py
+++ b/setup.py
@@ -64,7 +64,7 @@ if not PY3:
testing_extras = tests_require + ['nose', 'coverage']
setup(name='pyramid',
- version='1.3b3',
+ version='1.3',
description=('The Pyramid web application development framework, a '
'Pylons project'),
long_description=README + '\n\n' + CHANGES,