diff options
| author | Chris McDonough <chrism@agendaless.com> | 2010-09-13 02:39:26 +0000 |
|---|---|---|
| committer | Chris McDonough <chrism@agendaless.com> | 2010-09-13 02:39:26 +0000 |
| commit | 81d3b5412b43e4a104d0118ad4147402d787220e (patch) | |
| tree | bcf8b75f49b9015286a6439e67d71ad45f114292 /docs/glossary.rst | |
| parent | ad6a6706391c60dbdb66073caff1306b771da0bd (diff) | |
| download | pyramid-81d3b5412b43e4a104d0118ad4147402d787220e.tar.gz pyramid-81d3b5412b43e4a104d0118ad4147402d787220e.tar.bz2 pyramid-81d3b5412b43e4a104d0118ad4147402d787220e.zip | |
Features
--------
- A ``request.matched_route`` attribute is now added to the request
when a route has matched. Its value is the "route" object that
matched (see the ``IRoute`` interface within
``repoze.bfg.interfaces`` API documentation for the API of a route
object).
- The ``exception`` attribute of the request is now set slightly
earlier and in a slightly different set of scenarios, for benefit of
"finished callbacks" and "response callbacks". In previous
versions, the ``exception`` attribute of the request was not set at
all if an exception view was not found. In this version, the
``request.exception`` attribute is set immediately when an exception
is caught by the router, even if an exception view could not be
found.
Backwards Incompatibilities
---------------------------
- The router no longer sets the value ``wsgiorg.routing_args`` into
the environ when a route matches. The value used to be something
like ``((), matchdict)``. This functionality was only ever
obliquely referred to in change logs; it was never documented as an
API.
- The ``exception`` attribute of the request now defaults to ``None``.
In prior versions, the ``request.exception`` attribute did not exist
if an exception was not raised by user code during request
processing; it only began existence once an exception view was
found.
Deprecations
------------
- References to the WSGI environment values ``bfg.routes.matchdict``
and ``bfg.routes.route`` were removed from documentation. These
will stick around internally for several more releases, but it is
``request.matchdict`` and ``request.matched_route`` are now the
"official" way to obtain the matchdict and the route object which
resulted in the match.
Documentation
-------------
- Added two sections to the "Hooks" chapter of the documentation:
"Using Response Callbacks" and "Using Finished Callbacks".
- Added documentation of the ``request.exception`` attribute to the
``repoze.bfg.request.Request`` API documentation.
- Added glossary entries for "response callback" and "finished
callback".
- The "Request Processing" narrative chapter has been updated to note
finished and response callback steps.
Diffstat (limited to 'docs/glossary.rst')
| -rw-r--r-- | docs/glossary.rst | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/docs/glossary.rst b/docs/glossary.rst index a703f187c..158af2230 100644 --- a/docs/glossary.rst +++ b/docs/glossary.rst @@ -774,3 +774,13 @@ Glossary Values injected as names into a renderer based on application policy. See :ref:`adding_renderer_globals` for more information. + + response callback + A user-defined callback executed by the :term:`router` at a + point after a :term:`response` object is successfully created. + See :ref:`using_response_callbacks`. + + finished callback + A user-defined callback executed by the :term:`router` + unconditionally at the very end of request processing . See + :ref:`using_finished_callbacks`. |
