Ah, great, excellent, I totally forgot about this... thought they were limited to Pyramid configuration only and failed to re-read the docs properly. Except I don't see a way how to enforce single handler for particular events, and raise if multiple subscribers exist. Track count with a class member?

Thanks!

.oO V Oo.


On 12/14/2011 12:13 AM, John Anderson wrote:

You can use:
http://docs.pylonsproject.org/projects/pyramid/en/latest/api/events.html

this is how you would create custom events:
https://github.com/sontek/pyramid_signup/blob/master/pyramid_signup/events.py

this is how you would fire the event:
https://github.com/sontek/pyramid_signup/blob/master/pyramid_signup/views.py#L300

and this is how you would subscribe to the event:
https://github.com/sontek/pyramid_signup/blob/master/pyramid_signup/tests/test_views.py#L387

--
You received this message because you are subscribed to the Google Groups "pylons-discuss" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to [email protected]. For more options, visit this group at http://groups.google.com/group/pylons-discuss?hl=en.

--
You received this message because you are subscribed to the Google Groups 
"pylons-discuss" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/pylons-discuss?hl=en.

Reply via email to