django-postman / docs / notification.rst

Notification

Parties should be notified of these events:

  • when a message is rejected
  • when a message or a reply is received

For visitors

An email is sent, using these templates:

The available context variables are:

  • site: the Site instance
  • object: the Message instance
  • action: 'rejection' or 'acceptance'

Default templates are provided with the application. Same as for the views, you can override them, and design yours.

For users

Special case: In case of a rejection by the auto moderation feature, the user is immediately aware of it, so there is no need for a notification in addition.

If a notifier application is configured (see :ref:`optional_settings`), the following labels are used:

  • postman_rejection to notify the sender of the rejection
  • postman_message to notify the recipient of the reception of a message
  • postman_reply to notify the recipient of the reception of a reply

Some extra context variables are passed in the call to the notifier application and so are available in the templates:

  • message: the Message instance
  • action: 'rejection' or 'acceptance'

If no notifier application is used, an email is sent, using these templates:

In that case, the information about context variables and templates is the same as in the :ref:`for_visitors` section above.

Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for ProjectModifiedEvent.java.
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.