Tuesday, July 12, 2022

[FIXED] How can I model this behavior in Django?

Issue

I want to develop a notification system with Django. So I have an button (and a count of unread messages), that show all messages to the user, so the counter returns to zero again. How can detect my database, that the user already has read the messages and reset the counter? I dont think that I can emulate this with forms, isn't it?


Solution

You should have a look at the django-notifications package: https://github.com/django-notifications/django-notifications

It does exactly what you want. It also comes with a Live Updater Api to keep the unread notification number in sync.



Answered By - ilse2005
Answer Checked By - Marilyn (PHPFixing Volunteer)

No comments:

Post a Comment

Note: Only a member of this blog may post a comment.