From e2e6c14d571e2ae77b553e85bb71cc6a6793b7a3 Mon Sep 17 00:00:00 2001 From: moanos Date: Sat, 12 Jul 2025 16:46:17 +0200 Subject: [PATCH] feat: Show newest notification first --- src/fellchensammlung/views.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/fellchensammlung/views.py b/src/fellchensammlung/views.py index a714c47..bc301e5 100644 --- a/src/fellchensammlung/views.py +++ b/src/fellchensammlung/views.py @@ -602,7 +602,7 @@ def my_notifications(request): action = request.POST.get("action") process_notification_actions(request, action) - context = {"notifications_unread": Notification.objects.filter(user_to_notify=request.user, read=False), + context = {"notifications_unread": Notification.objects.filter(user_to_notify=request.user, read=False).order_by("-created_at"), "notifications_read_last": Notification.objects.filter(user_to_notify=request.user, read=True).order_by("-read_at") } return render(request, 'fellchensammlung/notifications.html', context=context)