{% comment %} Per-category Discord routing. Included by each section's settings page, which passes only its own categories. {% endcomment %} {% load i18n %}
{% translate "Discord channels" %}
{% if not webhooks %}
{% blocktranslate %}No webhooks exist yet. Add them in Django admin under Holdfast → Webhooks — the URL is a credential, so it lives there rather than on this page.{% endblocktranslate %}
{% else %}
{% blocktranslate %}Pick which channel each kind of alert goes to. Tick nothing and it goes to every enabled webhook, so an upgrade never leaves you silently unalerted.{% endblocktranslate %}
{% for route in routes %} {% endfor %}
{% translate "Alert" %} {% translate "Enabled" %} {% translate "Channels" %}
{{ route.get_category_display }}
{% for webhook in webhooks %}
{% endfor %}

{% blocktranslate %}Save first, then use Send test alerts below to fire one sample of each category down whatever routing is configured. It uses the same delivery path as a real alert, so anything that arrives really is wired up.{% endblocktranslate %}

{% endif %}