summaryrefslogtreecommitdiff
path: root/docs/whatsnew-1.1.rst
diff options
context:
space:
mode:
authorChris McDonough <chrism@agendaless.com>2009-11-02 12:23:26 +0000
committerChris McDonough <chrism@agendaless.com>2009-11-02 12:23:26 +0000
commit49304cecdf2c51888ee4ff42ec6496207186ad9b (patch)
tree82172ae270dfd0d5d972f65d4669c93219c9f469 /docs/whatsnew-1.1.rst
parent32d95886503540052d9b7075c9ce3326b042bb08 (diff)
downloadpyramid-49304cecdf2c51888ee4ff42ec6496207186ad9b.tar.gz
pyramid-49304cecdf2c51888ee4ff42ec6496207186ad9b.tar.bz2
pyramid-49304cecdf2c51888ee4ff42ec6496207186ad9b.zip
- Add a new event type: ``repoze.bfg.events.AfterTraversal``. Events
of this type will be sent after traversal is completed, but before any view code is invoked. Like ``repoze.bfg.events.NewRequest``, This event will have a single attribute: ``request`` representing the current request. Unlike the request attribute of ``repoze.bfg.events.NewRequest`` however, during an AfterTraversal event, the request object will possess attributes set by the traverser, most notably ``context``, which will be the context used when a view is found and invoked. The interface ``repoze.bfg.events.IAfterTraversal`` can be used to subscribe to the event. For example:: <subscriber for="repoze.bfg.interfaces.IAfterTraversal" handler="my.app.handle_after_traverse"/> Like any framework event, a subscriber function should expect one parameter: ``event``.
Diffstat (limited to 'docs/whatsnew-1.1.rst')
-rw-r--r--docs/whatsnew-1.1.rst17
1 files changed, 17 insertions, 0 deletions
diff --git a/docs/whatsnew-1.1.rst b/docs/whatsnew-1.1.rst
index e84d38a13..655e73882 100644
--- a/docs/whatsnew-1.1.rst
+++ b/docs/whatsnew-1.1.rst
@@ -595,6 +595,23 @@ Minor Miscellaneous Feature Additions
registered forbidden view. When the router catches a ``NotFound``,
it returns the registered notfound view.
+- Add a new event type: ``repoze.bfg.events.AfterTraversal``. Events
+ of this type will be sent after traversal is completed, but before
+ any view code is invoked. Like ``repoze.bfg.events.NewRequest``,
+ This event will have a single attribute: ``request`` representing
+ the current request. Unlike the request attribute of
+ ``repoze.bfg.events.NewRequest`` however, during an AfterTraversal
+ event, the request object will possess attributes set by the
+ traverser, most notably ``context``, which will be the context used
+ when a view is found and invoked. The interface
+ ``repoze.bfg.events.IAfterTraversal`` can be used to subscribe to
+ the event. For example::
+
+ <subscriber for="repoze.bfg.interfaces.IAfterTraversal"
+ handler="my.app.handle_after_traverse"/>
+
+ Like any framework event, a subscriber function should expect one
+ parameter: ``event``.
Backwards Incompatibilities
---------------------------