collab

Notifications

Collab has a built in notifications system. Basically, any app can send a notification to a user. The notification will show up in the main navigation for the user to read or hide.

To add notifications within an app you just:

from core.notifications.models import Notification
from core.notifications.email import EmailInfo

email_info = EmailInfo(
  subject=title,
  text_template='path/to/template.txt',
  html_template='path/to/template.html',
  to_address=user.email
)

Notification.set_notification(req.user, req.user, "notified", user_form,
                            user_form.owner, title, url, email_info)

Options

set_notification the following parameters (in order):