You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Consolidate notification code into dojo/notifications/ package
Move notification models, admin, services (helper.py), signals, tasks,
settings, context processors, forms, UI views/urls/templates, and API
serializers/viewsets/urls into dojo/notifications/, matching the
canonical dojo/url/ shape from CLAUDE.md.
- Notifications, Notification_Webhooks, Alerts (and constants) extracted
from dojo/models.py into dojo/notifications/models.py; admin moved to
dojo/notifications/admin.py using @admin.register(); registered from
dojo/apps.py ready() to keep model class definition out of settings load.
- helper.py absorbs process_tag_notifications and sla_compute_and_notify
from dojo/utils.py; all @app.task wrappers (log_generic_alert,
add_alerts, cleanup_alerts, async_sla_compute_and_notify_task,
send_{slack,msteams,mail,webhooks}_notification, webhook_reactivation,
webhook_status_cleanup) consolidated into dojo/notifications/tasks.py.
- Default-Notifications-on-User-create logic moved out of dojo/utils.py
into dojo/notifications/signals.py and registered via apps.py ready().
- 7 UI .html templates and 62 channel .tpl templates moved under
dojo/notifications/templates/notifications/. New TEMPLATES DIRS entry
added so notifications/{channel}/{event}.tpl lookups still resolve;
view template_name strings updated where the namespace changed.
- Env-var schema extracted into dojo/notifications/settings.py
(NOTIFICATIONS_ENV_DEFAULTS dict + populate_settings); settings.dist.py
unpacks it into env() and applies values to globals().
- bind_alert_count and session_expiry_notification moved to
dojo/notifications/context_processors.py; TEMPLATES paths updated.
- API NotificationsSerializer/NotificationWebhooksSerializer and
Viewsets relocated under dojo/notifications/api/, exposed via
add_notifications_urls(router) (CLAUDE.md API pattern).
- Celery beat task paths updated to dojo.notifications.tasks.*.
- Backward-compatible re-exports preserved at every original location
(dojo/models.py, dojo/forms.py, dojo/utils.py, dojo/tasks.py,
dojo/context_processors.py, dojo/api_v2/{serializers,views}.py,
dojo/notifications/helper.py).
- No new migrations (string FK references are migration-equivalent).
Verified: manage.py check, makemigrations --check (no diff),
spectacular --fail-on-warn, and the full
test_notifications + test_apiv2_notifications + test_jira_webhook +
test_cleanup_alerts + test_rest_framework suite (1325 tests) pass.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
0 commit comments