Reusable application for Django introducing a message delivery framework
Project description
https://github.com/idlesign/django-sitemessage
Description
Reusable application for Django introducing a message delivery framework.
Features:
Message Types - message classes exposing message composition logic (plain text, html, etc.).
Messengers - clients for various protocols (smtp, jabber, twitter, telegram, facebook, vkontakte, etc.);
Support for user defined message types.
Support for user defined messenger types.
Message prioritization.
Message subscription/unsubscription system.
Message grouping to prevent flooding.
Message ‘read’ indication.
Means for background message delivery and cleanup.
Means to debug integration: test requisites, delivery log.
Django Admin integration.
Configure messengers for your project (create sitemessages.py in one of your apps):
from sitemessage.toolbox import register_messenger_objects, register_message_types
from sitemessage.messengers.smtp import SMTPMessenger
register_messenger_objects(
# Here we register one messenger to deliver emails.
# By default it uses mailing related settings from Django settings file.
SMTPMessenger()
)
Schedule messages for delivery when and where needed (e.g. in a view):
from sitemessage.shortcuts import schedule_email
def send_mail_view(request):
...
# Suppose `user_model` is a recipient Django User model instance.
user1_model = ...
# We pass `request.user` into `sender` to keep track of senders.
schedule_email('Message from sitemessage.', [user1_model, 'user2@host.com'], sender=request.user)
...
Periodically run Django management command from wherever you like (cli, cron, Celery, uWSGI, etc.):
./manage.py sitemessage_send_scheduled
And that’s only the tip of sitemessage iceberg, read the docs %)
Documentation
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Hashes for django_sitemessage-1.4.0-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | aab4bf92daad6324261f868af5c65414e669319e7c3f6dacb7653ac8fff63ddd |
|
MD5 | 7ea38ef42eb18f229ab004e8d1a93a23 |
|
BLAKE2b-256 | 4a146e0ebebadc53bd0017d648e20873aebd1145268ac83785dea25c3103e39f |