while the 'unread_list' API works, I cannot get the tag {% live_notify_list list_class="dropdown-menu" %}
to work.
The tag definition is:
def live_notify_list(list_class='live_notify_list'):
html = "<ul class='{list_class}'></ul>".format(list_class=list_class)
return format_html(html)
correct me if I am wrong, but this doesn't do anything but returning an unsorted list. I would like to display all the notifications. According to the documentation (documentation) all I need to do is to use {% live_notify_list %}
however, this doesn't display anything.
The library I am using at github.
DevKing, hopefully you have solved the issue. To give more context, the {% live_notify_list %} is used for getting real-time updates of notifications that can be used in a dropdown on a navbar. A user can click and get a dropdown of the most recent notifications (the default is 5). If you want a list of all notifications, you can provide a link to {% url 'notifications:unread' %}.
You will need to include this
And then you can place this within your navbar
The {% live_notify_badge %} will show you the number of unread notifications while the {% live_notify_list %} will provide the list of recent notifications. The js added above will pull new notifications every 15 seconds (which you can make shorter/longer).