Skip to content

instance-based events #7

Description

@fcurella

It would be useful if subscribers could receive events only related to a specific instance.

Scenario:

A web application lets users create their own AddressBook. Each AddressBook have many Contacts:

class AddressBook(models.Model):
    user = models.ForeignKey('auth.User')

@webhook_model(
    on_create=ModelEvent('contact.created'),
)
class Contact(models.Model):
    name = models.CharField(max_length=255)
    address_book = models.ForeignKey(AddressBook, related_name='contacts')

There doesn't seem to be a way for a subscriber to receive contact.created events only for Contacts of a specific AddressBook.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions