event integration plus docs

This commit is contained in:
Andrew Mleczko
2011-06-17 18:04:47 +02:00
parent 5a26067255
commit ac6deaeb93
3 changed files with 42 additions and 4 deletions
+11
View File
@@ -118,6 +118,17 @@ You can also add an ``__acl__`` attribute to your model class:
.. literalinclude:: ../pyramidapp/pyramidapp/models.py
:pyobject: Bar
Event subscription
==================
``pyramid_formalchemy`` provides four events: ``IBeforeValidateEvent``,
``IAfterSyncEvent``, ``IBeforeDeleteEvent`` and ``IBeforeRenderEvent``.
There are also two more specific render evnts: ``IBeforeShowRenderEvent``
and ``IBeforeEditRenderEvent``. You can use ``pyramid_formalchemy.events.subscriber``
decorator to subscribe:
.. literalinclude:: ../pyramidapp/pyramidapp/events.py
Api
===