A Web Hook Event.
Parameters: |
|
---|
The name of the hook.
If not provided this will be automatically generated using the class module and name, if you want to use this feature you can’t use relative imports.
Add listener for this signal.
Parameters: |
|
---|
Add listener with an instantiated config_form.
Parameters: |
|
---|
How we filter events.
Parameters: |
|
---|
Initialize the match forms with data recived by a request.
Returns: | A list of instantiated match forms. |
---|
Prepare the payload for dispatching.
You can add any additional formatting of the payload here.
Send signal and dispatch to all listeners.
Parameters: |
|
---|
>>> from django.db import signals
>>> from django.contrib.auth.models import User
>>> hook = ModelHook(User, signals.post_save,
... name="user-post-save",
... provides_args=["username", "is_admin"])
>>> joe = User.objects.get(username="joe")
>>> joe.is_admin = True
>>> joe.save()