add django-signal-webhooks

This commit is contained in:
Nick Sweeting 2024-05-06 06:58:03 -07:00
parent 3805a1730d
commit c7fc9c004f
No known key found for this signature in database
5 changed files with 36 additions and 3 deletions

View file

@ -18,6 +18,7 @@ from ..config import (
CUSTOM_TEMPLATES_DIR,
SQL_INDEX_FILENAME,
OUTPUT_DIR,
ARCHIVE_DIR,
LOGS_DIR,
TIMEZONE,
@ -63,6 +64,7 @@ INSTALLED_APPS = [
'core',
'api',
'signal_webhooks',
'django_extensions',
]
@ -253,6 +255,23 @@ CACHES = {
EMAIL_BACKEND = 'django.core.mail.backends.console.EmailBackend'
STORAGES = {
"archive": {
"BACKEND": "django.core.files.storage.FileSystemStorage",
"OPTIONS": {
"base_url": "/archive/",
"location": ARCHIVE_DIR,
},
},
# "personas": {
# "BACKEND": "django.core.files.storage.FileSystemStorage",
# "OPTIONS": {
# "base_url": "/personas/",
# "location": PERSONAS_DIR,
# },
# },
}
################################################################################
### Security Settings
################################################################################
@ -379,3 +398,15 @@ LOGGING = {
}
},
}
# Add default webhook configuration to the User model
SIGNAL_WEBHOOKS = {
"HOOKS": {
"django.contrib.auth.models.User": ...,
"core.models.Snapshot": "...",
"core.models.ArchiveResult": "...",
"core.models.Tag": "...",
"api.models.APIToken": "...",
},
}