{% for notification in request.user.notifications.all|slice:':10' %}
  • {% include 'notifications/notification_detail.html' %}
  • {% empty %}
  • Phew, you don’t have any notifications
  • {% endfor %} {% if request.user.notifications.unread.exists %}
  • Mark all as read
  • {% elif request.user.notifications.read.exists %}
  • Delete all
  • {% endif %}