From 9d0643063615ef7ce54fe062461c5dbf92cde3b4 Mon Sep 17 00:00:00 2001 From: Amos Latteier Date: Mon, 12 Aug 2013 16:04:00 -0400 Subject: Add documentation for creating and firing custom events. See issue #982. --- docs/api/registry.rst | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'docs/api/registry.rst') diff --git a/docs/api/registry.rst b/docs/api/registry.rst index db348495c..f96b23b68 100644 --- a/docs/api/registry.rst +++ b/docs/api/registry.rst @@ -29,6 +29,14 @@ This attribute is often accessed as ``request.registry.introspector`` in a typical Pyramid application. + .. method:: notify(*events) + + Fire one or more event. All event subscribers to the event(s) + will be notified. This method is often accessed as + ``request.registry.notify`` in Pyramid applications to fire + custom events. See :ref:`custom_events` for more information. + + .. class:: Introspectable .. versionadded:: 1.3 -- cgit v1.2.3 From 29ab2b964164844daa012c3e80d276f49ccbe217 Mon Sep 17 00:00:00 2001 From: Amos Latteier Date: Mon, 12 Aug 2013 16:45:11 -0400 Subject: Minor fixes suggested by @tshepang and @mmerickel thanks! --- docs/api/registry.rst | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'docs/api/registry.rst') diff --git a/docs/api/registry.rst b/docs/api/registry.rst index f96b23b68..42a405a32 100644 --- a/docs/api/registry.rst +++ b/docs/api/registry.rst @@ -31,8 +31,9 @@ .. method:: notify(*events) - Fire one or more event. All event subscribers to the event(s) - will be notified. This method is often accessed as + Fire one or more events. All event subscribers to the event(s) + will be notified. The subscribers will be called synchronously on + the current thread. This method is often accessed as ``request.registry.notify`` in Pyramid applications to fire custom events. See :ref:`custom_events` for more information. -- cgit v1.2.3 From 8339cd1095be5e49fe41662e3618b8da6055a4f0 Mon Sep 17 00:00:00 2001 From: Michael Merickel Date: Mon, 12 Aug 2013 16:28:57 -0500 Subject: remove the "thread" reference --- docs/api/registry.rst | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'docs/api/registry.rst') diff --git a/docs/api/registry.rst b/docs/api/registry.rst index 42a405a32..7736cf075 100644 --- a/docs/api/registry.rst +++ b/docs/api/registry.rst @@ -32,10 +32,10 @@ .. method:: notify(*events) Fire one or more events. All event subscribers to the event(s) - will be notified. The subscribers will be called synchronously on - the current thread. This method is often accessed as - ``request.registry.notify`` in Pyramid applications to fire - custom events. See :ref:`custom_events` for more information. + will be notified. The subscribers will be called synchronously. + This method is often accessed as ``request.registry.notify`` + in Pyramid applications to fire custom events. See + :ref:`custom_events` for more information. .. class:: Introspectable -- cgit v1.2.3