Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Rename ModelEvent to EventSender #9

Open
D3f0 opened this issue Dec 27, 2013 · 1 comment
Open

Rename ModelEvent to EventSender #9

D3f0 opened this issue Dec 27, 2013 · 1 comment

Comments

@D3f0
Copy link
Contributor

D3f0 commented Dec 27, 2013

Actual event is just a JSON or dict, but ModelEvent instances are just responibles of event emission.

@D3f0
Copy link
Contributor Author

D3f0 commented Feb 18, 2015

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
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant