espressodb.notifications

Module: espressodb.notifications

espressodb.notifications.models

Implements notifications similar to logging with optional viewer restrictions

espressodb.notifications.views

Views for notifications module.

espressodb.notifications.urls

Contains url patterns for the notifications app

espressodb.notifications.templatetags

Templatetags for the notifications module.

The notification module provides a Python logging.Logger like class which stores and reads information to the database.

Example

The notfier works just like a Logger, e.g.,

notifier = get_notifier()
notifier.info("Hello world!", title="Test the notifier")

See also the espressodb.notifications.models.Notifier class for more information.


get_notifier(tag=None, groups=None)[source]

Get a notifier instance.

Parameters
  • tag (Optional[str]) – The tag of the notification. Used for fast searches.

  • groups (Optional[List[str]]) – The user groups which are allowed to view this notfication. No groups means not logged in users are able to view the notfication.

Return type

Notifier

Returns

A notifier instance