|
2 | 2 | title: 'Upgrading to DefectDojo Version 2.58.x' |
3 | 3 | toc_hide: true |
4 | 4 | weight: -20260504 |
5 | | -description: Notification templates relocated under dojo/notifications/ |
| 5 | +description: Notification .tpl templates relocated under dojo/notifications/ |
6 | 6 | --- |
7 | 7 |
|
8 | | -## Notification templates relocated |
| 8 | +## Notification `.tpl` templates relocated |
9 | 9 |
|
10 | | -The notification domain has been consolidated under a new `dojo/notifications/` package. Notification templates that previously lived under `dojo/templates/` have been moved into `dojo/notifications/templates/notifications/`. Most templates can still be resolved by their existing lookup name, but the seven notification UI templates have been re-namespaced and any custom overrides of those need to be updated. |
| 10 | +The notification domain has been consolidated under a new `dojo/notifications/` package, and the 62 channel `.tpl` templates that drive alert, mail, MS Teams, Slack, and webhook notifications have moved on disk. The Django template lookup name (e.g. `notifications/mail/scan_added.tpl`) is unchanged, so most customizations keep working without any edits — but operators who override `.tpl` files by mounting them into the source tree need to update their paths. |
11 | 11 |
|
12 | | -### Channel templates (no action required for most users) |
| 12 | +### What moved |
13 | 13 |
|
14 | | -The 62 channel templates under `alert/`, `mail/`, `msteams/`, `slack/`, `webhooks/`, and `webhooks_summary/` keep their existing template lookup names (e.g. `notifications/mail/scan_added.tpl`, `notifications/slack/sla_breach.tpl`). Existing customizations that override these by lookup name continue to work — only the on-disk source location has changed. |
| 14 | +The channel templates under `alert/`, `mail/`, `msteams/`, `slack/`, `webhooks/`, and `webhooks_summary/` have been relocated: |
15 | 15 |
|
16 | | -### Notification UI templates (action required if customized) |
17 | | - |
18 | | -The seven notification UI templates have moved AND been re-namespaced from `dojo/...html` to `notifications/...html`: |
19 | | - |
20 | | -| Old lookup name | New lookup name | |
| 16 | +| Old on-disk location | New on-disk location | |
21 | 17 | | --- | --- | |
22 | | -| `dojo/alerts.html` | `notifications/alerts.html` | |
23 | | -| `dojo/delete_alerts.html` | `notifications/delete_alerts.html` | |
24 | | -| `dojo/notifications.html` | `notifications/notifications.html` | |
25 | | -| `dojo/add_notification_webhook.html` | `notifications/add_notification_webhook.html` | |
26 | | -| `dojo/edit_notification_webhook.html` | `notifications/edit_notification_webhook.html` | |
27 | | -| `dojo/delete_notification_webhook.html` | `notifications/delete_notification_webhook.html` | |
28 | | -| `dojo/view_notification_webhooks.html` | `notifications/view_notification_webhooks.html` | |
| 18 | +| `dojo/templates/notifications/{channel}/{event}.tpl` | `dojo/notifications/templates/notifications/{channel}/{event}.tpl` | |
| 19 | + |
| 20 | +For example, `dojo/templates/notifications/mail/scan_added.tpl` now lives at `dojo/notifications/templates/notifications/mail/scan_added.tpl`. A new `TEMPLATES["DIRS"]` entry pointing at `dojo/notifications/templates/` is registered automatically, so the lookup path used by `render_to_string()` (e.g. `notifications/slack/sla_breach.tpl`) resolves exactly as before. |
29 | 21 |
|
30 | | -### Required Actions |
| 22 | +### Required actions |
31 | 23 |
|
32 | | -If you have overridden any of the seven notification UI templates above (for example by placing a custom `dojo/notifications.html` in your own templates directory), you must rename the override to the new `notifications/...html` path so it continues to take effect. No action is required for users who have not customized these templates, and no action is required for the channel `.tpl` templates regardless of customization. |
| 24 | +- **Customizing `.tpl` files via your own templates directory (recommended pattern):** No action required. Overrides resolved by lookup name continue to take precedence. |
| 25 | +- **Customizing `.tpl` files via a Docker volume mount or in-tree patch at the old `dojo/templates/notifications/...` path:** Update the mount/patch target to the new `dojo/notifications/templates/notifications/...` path, or move your override into a project-level templates directory keyed by the lookup name. |
| 26 | +- **No customizations:** No action required. |
33 | 27 |
|
34 | 28 | For more information, check the [Release Notes](https://github.com/DefectDojo/django-DefectDojo/releases/tag/2.58.0). |
0 commit comments