mirror of
https://github.com/wassname/pyramid_formalchemy.git
synced 2026-08-15 12:45:25 +08:00
event integration plus docs
This commit is contained in:
@@ -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
|
||||
===
|
||||
|
||||
|
||||
Reference in New Issue
Block a user