django-notifications/notifications/tests/templates/test_live.html
2015-12-12 07:09:20 +00:00

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>