notifications_extras

Module: espressodb.notifications.templatetags.notifications_extras

bootstrap_level(level)

Maps logging levels to bootstrap levels.

render_notification(notification[, hide_close])

Renders notifications

render_notification_links(user)

Renders notification links.


Additional in template functions for the notifications module.

bootstrap_level(level)[source]

Maps logging levels to bootstrap levels. Defaults to light.

Parameters

level (str) – The logging level.

Return type

str

render_notification(notification, hide_close=False)[source]

Renders notifications

Parameters
  • notification (Notification) – The notification.

  • hide_close (bool) – Hide the has read button in view for this notfication.

Uses template espressodb/notfications/templates/render_notification.html.

Return type

Dict[str, Any]

Renders notification links.

Parameters

user (User) – The currently logged in user.

Also adds informations about notifications which are viewable by user.

Uses template espressodb/notfications/templates/render_notification_links.html.