Open D3f0 opened 10 years ago
This has to be reviewed. Telegraphy original approach to signal/broadcaster approach seems quite limited now. Maybe we'll take some inspiration from https://github.com/zapier/django-rest-hooks/blob/master/README.md
More precicely
HOOK_EVENTS = {
# 'any.event.name': 'App.Model.Action' (created/updated/deleted)
'book.added': 'bookstore.Book.created',
'book.changed': 'bookstore.Book.updated',
'book.removed': 'bookstore.Book.deleted',
# and custom events, no extra meta data needed
'book.read': None,
'user.logged_in': None
}
Actual event is just a JSON or dict, but ModelEvent instances are just responibles of event emission.