Notifications

Declare notifications in notifications.py. These will be detected during syncdb or migrate and available to send via the different backends.

Functions

Create Notification

notifier.shortcuts.create_notification(name, display_name=None, permissions=None, backends=None, public=True)[source]

Arguments

name:notification name, unique (string)
display_name:notification display name, can be non-unique (string)
permissions:list of permission names or objects
backends:list of backend names or objects
public:(boolean)
Returns
Notification object

Send Notification

notifier.shortcuts.send_notification(name, users, context=None)[source]

Arguments

name:notification name (string)
users:user object or list of user objects
context:additional context for notification templates (dict)

Returns

None