Limit how many notifications are loaded

This commit is contained in:
Mouse Reeve 2021-04-26 10:11:13 -07:00
parent 7449f34a61
commit 99efe6b290

View file

@ -16,7 +16,7 @@ class Notifications(View):
notifications = request.user.notification_set.all().order_by("-created_date")
unread = [n.id for n in notifications.filter(read=False)]
data = {
"notifications": notifications,
"notifications": notifications[:50],
"unread": unread,
}
notifications.update(read=True)