{% load i18n static humanize %} django-nyt notification test panel

Notification tests

This is a test page with a simple styling to test the notification system and convince potential users that django-nyt is pretty cool.

Notification live stream

Here you'll see new notifications as they arrive from the server.

  • Notifications (0):
  • {% trans "No notifications found" %}
{% trans "Mark seen and clear" %} {% trans "Fetch" %}

Create a notification

After filling in the form, everyone subscribed to receive notification instantly for the Test Model object should receive them.

NB! By design, saving a notification does not trigger displaying one. This way, you can play around with automatic updating and channels.

{% csrf_token %} {{ testmodel_form.name }}

Login as another user

Select one of the test user accounts and you'll be logged in (this is a test application, so don't use this mechanism in production)

{% for user in users %}

Login as {{ user.username }}

{% endfor %}

Notification settings

Change settings of currently logged in user

{% csrf_token %} {% if settings_form %} {{ settings_form.as_p }} {% else %} Not logged in {% endif %}

List of notifications (static)

Please reload this page to have the list updated

{% for notification in notifications %} {% endfor %}
Message Created Seen Type
{{ notification.message }} x{{ notification.occurrences }} {{ notification.modified|naturaltime }} {{ notification.is_viewed|yesno }} {{ notification.subscription.notification_type.key }}