django-sitemessage 0.5.1

Reusable application for Django introducing a message delivery framework

Homepage: https://github.com/idlesign/django-sitemessage

Platform: Pypi

Language: Python

License: BSD-3-Clause-Clear

View on registry: https://pypi.python.org/pypi/django-sitemessage/


django-sitemessage

https://github.com/idlesign/django-sitemessage

https://badge.fury.io/py/django-sitemessage.png https://pypip.in/d/django-sitemessage/badge.png https://coveralls.io/repos/idlesign/django-sitemessage/badge.png https://travis-ci.org/idlesign/django-sitemessage.svg?branch=master https://landscape.io/github/idlesign/django-sitemessage/master/landscape.svg?style=plastic

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, 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.toolbox import register_messenger_objects, register_builtin_message_types
from sitemessage.messengers.smtp 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)
)
# And register built-in message types we'd use (for Django < 1.7).
register_builtin_message_types()
  1. 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)
 ...
  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 %)

Documentation

http://django-sitemessage.readthedocs.org/

веселые картинки развлекательные гифки интресные факты смешные видео смешные истории из соцсетей

GitHub Repository

idlesign/django-sitemessage idlesign/django-sitemessage

Reusable application for Django introducing a message delivery framework

https://github.com/idlesign/django-sitemessage

Language: Python

Created: June 17, 2014 13:28

Last updated: March 17, 2015 04:38

Last pushed: March 16, 2015 15:23

Size: 378 KB

Stars: 12

Forks: 2

Watchers: 3

Open issues: 0

Top Contributors

Igor Starikov

Releases

  • 0.5.1 - February 25, 2015 14:08
  • 0.5.0 - February 23, 2015 11:27
  • 0.4.1 - September 07, 2014 11:00
  • 0.4.0 - September 07, 2014 03:33
  • 0.3.0 - June 27, 2014 14:59
  • 0.2.0 - June 18, 2014 18:13
  • 0.1.0 - June 17, 2014 14:35

Related Projects

django-annoying 0.8.1
This is a django application that tries to eliminate annoying things in the Django framework.
Pypi - Python - BSD-3-Clause - Updated about 1 month ago - 326 stars
django-json-messages 0.1.2
Json encode messages from the Django messages framework and dump them as JS
Pypi - Python - GPL-2.0 - Updated about 1 month ago
django-metasettings 0.2
A reusable Django application to control the currency rate and favorite language code, inspired b...
Pypi - Python - Other - Updated 21 days ago - 5 stars
django-taggit 0.12.3
django-taggit is a reusable Django application for simple tagging.
Pypi - Python - BSD-3-Clause - Updated 28 days ago - 1,209 stars
dconfig 0.1.3
A Django config for the Django framework.
Pypi - Python - Other - Updated 27 days ago
веселые картинки развлекательные гифки интресные факты смешные видео смешные истории из соцсетей