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.
Schedule and send messages with several easy steps, using concepts of:
Messengers - clients for various protocols (smtp, jabber, twitter, telegram, facebook, vkontakte, etc.);
Message Types - message classes exposing message composition logic (plain text, html, etc.).
Configure messengers for your project (create sitemessages.py in one of your apps):
from sitemessage.toolbox import register_messenger_objects
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-0.11.1.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | 6d6fc451169ea87d384d65d4852abef28b6cb193874b5333178cc707a066a06e |
|
MD5 | 97a9fb782b0f2a223d6a78d1d6314884 |
|
BLAKE2b-256 | 51abbf89d1d776263a9c3d019e9f689ae7f4110a298544c7f47d1a79ee1e1e9d |
Hashes for django_sitemessage-0.11.1-py2.py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 54801ad75e0df37b7e81a0996c63e18c14b0f218153345424c25a485c194b02d |
|
MD5 | 09a2ed3e1e0b5cf51de9ac117bc28d6a |
|
BLAKE2b-256 | babd68c717fdebd09dc9e09d2a0dd9af936c157a00615a236acf12abe1af0fd2 |