espressodb.notifications¶
Module: espressodb.notifications
Implements notifications similar to logging with optional viewer restrictions |
|
Views for notifications module. |
|
Contains url patterns for the notifications app |
|
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
- Returns
A notifier instance