mirror of
https://github.com/ae-utbm/sith.git
synced 2026-10-12 13:46:05 +00:00
Add "Mark all as read"
This commit is contained in:
1 parent
bf9aa29a54
commit
e3c86c1d05
3 files changed
+71
-57
No files matched your search
@@ -21,6 +21,8 @@ class NotificationList(ListView):
|
||||
template_name = "core/notification_list.jinja"
|
||||
|
||||
def get_queryset(self):
|
||||
if 'see_all' in self.request.GET.keys():
|
||||
self.request.user.notifications.update(viewed=True)
|
||||
return self.request.user.notifications.order_by('-id')[:20]
|
||||
|
||||
def notification(request, notif_id):
|
||||
|
||||
Reference in new issue
Block a user