У вас {{ total_count }} {% if total_count == 1 %}новое уведомление{% elif total_count < 5 %}новых уведомления{% else %}новых уведомлений{% endif %}
{% for category_code, notifs in grouped_notifications.items %}
{% for notification in notifs %}
{{ notification.title }}
{{ notification.message|truncatewords:20 }}
{{ notification.created_at|date:"d.m.Y H:i" }}
{% if notification.action_url %}
{% endif %}
{% endfor %}
{% endfor %}
Посмотреть все уведомления