summaryrefslogtreecommitdiff
path: root/docs/narr/events.rst
diff options
context:
space:
mode:
authorChris McDonough <chrism@agendaless.com>2009-12-26 19:23:29 +0000
committerChris McDonough <chrism@agendaless.com>2009-12-26 19:23:29 +0000
commit831da8a6969703d79c4efb27a96c734140babf45 (patch)
tree25c9bce67e31e310ff9bd715d50b03be05ee27b5 /docs/narr/events.rst
parentbc034ab4f50adde1a21062c7b8a583f7c9acf545 (diff)
downloadpyramid-831da8a6969703d79c4efb27a96c734140babf45.tar.gz
pyramid-831da8a6969703d79c4efb27a96c734140babf45.tar.bz2
pyramid-831da8a6969703d79c4efb27a96c734140babf45.zip
- Created new top-level documentation section: "ZCML Directives".
This section contains detailed ZCML directive information, some of which was removed from various narrative chapters.
Diffstat (limited to 'docs/narr/events.rst')
-rw-r--r--docs/narr/events.rst12
1 files changed, 3 insertions, 9 deletions
diff --git a/docs/narr/events.rst b/docs/narr/events.rst
index c257ddb86..b2d2f20b5 100644
--- a/docs/narr/events.rst
+++ b/docs/narr/events.rst
@@ -65,14 +65,6 @@ registry` by either of the following methods:
handler=".subscribers.mysubscriber"
/>
- The *subscriber* :term:`ZCML directive` takes two attributes:
- ``for``, and ``handler``. The value of ``for`` is the interface
- the subscriber is registered for. Registering a subscriber for a
- specific interface limits the event types that the subscriber will
- receive to those specified by the interface. The value of
- ``handler`` is a Python dotted-name path to the subscriber
- function.
-
Each of the above examples implies that every time the
:mod:`repoze.bfg` framework emits an event object that supplies an
:class:`repoze.bfg.interfaces.INewRequest` interface, the
@@ -112,7 +104,9 @@ file:
handler=".subscribers.handle_new_response"
/>
-Or imperatively via the
+See also :ref:`subscriber_directive`.
+
+Subscribers may also be configured imperatively via the
:meth:`repoze.bfg.configuration.Configurator.add_subscriber` method:
.. ignore-next-block