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
File details
Details for the file django-sitemessage-1.1.0.tar.gz
.
File metadata
- Download URL: django-sitemessage-1.1.0.tar.gz
- Upload date:
- Size: 47.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: Python-urllib/2.7
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 1b5df956b6cc9b741122bde285ae412f4a95a90ee02015cb5d5db43202d08632 |
|
MD5 | f7160f8b0a03b45bc5faab6e03406466 |
|
BLAKE2b-256 | c17117d238aa3134e793a5b2c38b612fbde22ffbe95dd53d3c3c47f61244f3b8 |
File details
Details for the file django_sitemessage-1.1.0-py2.py3-none-any.whl
.
File metadata
- Download URL: django_sitemessage-1.1.0-py2.py3-none-any.whl
- Upload date:
- Size: 50.3 kB
- Tags: Python 2, Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: Python-urllib/2.7
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 02520b6402df79c1b2f67555ce0f987649468842c4ca126c29158f4eddba31eb |
|
MD5 | 8e45c3e9aee049bc69a70f03bc67be92 |
|
BLAKE2b-256 | 4d65df99ac4ba8799813f5a0adb2b98b54adbdf7193116313e7676b957b49482 |