|Version 2 (modified by 10 years ago) ( diff ),|
S3 Subscriptions / Notifications
The S3Notifications framework is used to send automatic update notifications to subscribers.
Person Entities (e.g. users) can subscribe to get notified when new records get created or records get updated in a resource. Subscriptions can be filtered (using saved filters) to limit notifications to records matching certain filter criteria.
Subscriptions use the S3SubscriptionsModel in modules/s3db/pr.py:
pr_subscription table stores the notification settings and links to the subscriber person entity (user) and the filter.
pr_subscription_resource table is a component of
pr_subscription and stores the name of the resource and the URL of the controller to check for updates.
All resources in a subscription use the same filter. If different filters are to be used, multiple subscriptions are required.
No generic user interface for subscriptions has been implemented so far.
A custom interface can be found in private/templates/DRMP/controllers.py. This interface manages a single subscription per user with multiple resources using a common filter.