mirror of
https://github.com/Hopiu/django-notifications.git
synced 2026-05-04 11:34:43 +00:00
14 lines
634 B
HTML
14 lines
634 B
HTML
{% load static notifications_tags %}
|
|
|
|
<script src="{% static 'notifications/notify.js' %}" type="text/javascript"></script>
|
|
<script src="{% static 'notifications/live-test.js' %}" type="text/javascript"></script>
|
|
{% register_notify_callbacks callbacks='fill_notification_list,fill_notification_badge' to_fetch=20 refresh_period=5 %}
|
|
|
|
There are this many notifications pending: <span id='live_notify_badge'></span>
|
|
|
|
<button onclick='make_notification()'>Make a notification</button>
|
|
<ul class="notifications" id="live_notify_list">
|
|
{% for notice in notifications %}
|
|
{% include 'notifications/notice.html' %}
|
|
{% endfor %}
|
|
</ul>
|