switch from monkey patching WebhookModel to using swappable

This commit is contained in:
Nick Sweeting 2024-05-13 02:36:15 -07:00
parent e97d779cd3
commit f896e5dbeb
No known key found for this signature in database
3 changed files with 35 additions and 14 deletions

View file

@ -421,9 +421,11 @@ LOGGING = {
# Add default webhook configuration to the User model
SIGNAL_WEBHOOKS_CUSTOM_MODEL = 'api.models.OutboundWebhook'
SIGNAL_WEBHOOKS = {
"HOOKS": {
"django.contrib.auth.models.User": ..., # ... is a special value that means "use the default autogenerated hooks"
# ... is a special sigil value that means "use the default autogenerated hooks"
"django.contrib.auth.models.User": ...,
"core.models.Snapshot": ...,
"core.models.ArchiveResult": ...,
"core.models.Tag": ...,