def mark_all_as_read(self, recipient=None):
        # We want to filter out read ones, as later we will store
        # the time they were marked as read.
        qs = self.unread(True)
        if recipient:
            qs = qs.filter(recipient=recipient)

        qs.update(unread=False)
Mark as read any unread messages in the current queryset.
dataset/ETHPy150Open django-notifications/django-notifications/notifications/models.py/NotificationQuerySet.mark_all_as_read