I want a notification system for my app, so I was looking into a django package called django-notifications. I understood all of it but NOTIFICATION_SOFT_DELETE=True settings.
I mean when I do the following:
from notifications import notify
notify.send(user, recipient=user, verb='you reached level 10')
This will make an entry to the database with deleted=False
if I am not wrong. I have the following in my settings.py
:
NOTIFICATIONS_SOFT_DELETE=True
which updates to deleted=False
to deleted=True
. But I don't know when this change happens. There is one API in documentation which marks all notifications as deleted=True
:
qs.mark_all_as_deleted() | qs.mark_all_as_deleted(recipient)
Mark all notifications in the queryset (optionally also filtered by recipient) as deleted=True. Must be used with NOTIFICATIONS_SOFT_DELETE=True.
but how to mark some notifications to be deleted
??