Skip to main content
This is a pre-production deployment of Warehouse. Changes made here affect the production instance of PyPI (pypi.python.org).
Help us improve Python packaging - Donate today!

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, etc.);
  • Message Types - message classes exposing message composition logic (plain text, html, etc.).
  1. Configure messengers for your project (create sitemessages.py in one of your apps):
from sitemessage.utils import register_messenger_objects
from sitemessage.messengers import SMTPMessenger

register_messenger_objects(
    # Here we register only one messenger to deliver emails.
    SMTPMessenger('user1@host.com', 'user1', 'user1password', host='smtp.host.com', use_tls=True)
)
  1. Schedule messages for delivery when and where needed (e.g. in a view):
from sitemessage.schortcuts 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)

    ...
  1. Periodically run Django management command from wherever you like (cli, cron, Celery, etc.):

    ./manage.py sitemessage_send_scheduled

And that’s only the tip of sitemessage iceberg, read the docs %)

Release History

Release History

History Node

0.8.4

History Node

0.8.3

History Node

0.8.2

History Node

0.8.1

History Node

0.8.0

History Node

0.7.2

History Node

0.7.1

History Node

0.7.0

History Node

0.6.0

History Node

0.5.1

History Node

0.5.0

History Node

0.4.1

History Node

0.4.0

History Node

0.3.0

History Node

0.2.0

This version
History Node

0.1.0

Download Files

Download Files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

File Name & Checksum SHA256 Checksum Help Version File Type Upload Date
django-sitemessage-0.1.0.tar.gz (26.5 kB) Copy SHA256 Checksum SHA256 Source Jun 17, 2014

Supported By

WebFaction WebFaction Technical Writing Elastic Elastic Search Pingdom Pingdom Monitoring Dyn Dyn DNS Sentry Sentry Error Logging CloudAMQP CloudAMQP RabbitMQ Heroku Heroku PaaS Kabu Creative Kabu Creative UX & Design Fastly Fastly CDN DigiCert DigiCert EV Certificate Rackspace Rackspace Cloud Servers DreamHost DreamHost Log Hosting