django-sitemessage


Namedjango-sitemessage JSON
Version 0.9.1 PyPI version JSON
download
home_pagehttps://github.com/idlesign/django-sitemessage
SummaryReusable application for Django introducing a message delivery framework
upload_time2018-03-24 05:45:47
maintainer
docs_urlNone
authorIgor `idle sign` Starikov
requires_python
licenseBSD 3-Clause License
keywords
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI
coveralls test coverage
            django-sitemessage
==================
https://github.com/idlesign/django-sitemessage

.. image:: https://img.shields.io/pypi/v/django-sitemessage.svg
    :target: https://pypi.python.org/pypi/django-sitemessage

.. image:: https://img.shields.io/pypi/l/django-sitemessage.svg
    :target: https://pypi.python.org/pypi/django-sitemessage

.. image:: https://img.shields.io/coveralls/idlesign/django-sitemessage/master.svg
    :target: https://coveralls.io/r/idlesign/django-sitemessage

.. image:: https://travis-ci.org/idlesign/django-sitemessage.svg?branch=master
    :target: https://travis-ci.org/idlesign/django-sitemessage

.. image:: https://landscape.io/github/idlesign/django-sitemessage/master/landscape.svg?style=flat
   :target: https://landscape.io/github/idlesign/django-sitemessage/master



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.).


1. Configure messengers for your project (create `sitemessages.py` in one of your apps):

.. code-block:: python

    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()


2. Schedule messages for delivery when and where needed (e.g. in a view):

.. code-block:: python

    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)

        ...


3. 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/

            

Raw data

            {
    "maintainer": "", 
    "docs_url": null, 
    "requires_python": "", 
    "maintainer_email": "", 
    "cheesecake_code_kwalitee_id": null, 
    "keywords": "", 
    "upload_time": "2018-03-24 05:45:47", 
    "author": "Igor `idle sign` Starikov", 
    "home_page": "https://github.com/idlesign/django-sitemessage", 
    "github_user": "idlesign", 
    "download_url": "https://pypi.python.org/packages/ff/f0/cf7d03f1b11128e17d2f44f56ac0a321e59a8beb3ba415c374d6d581fb29/django-sitemessage-0.9.1.tar.gz", 
    "platform": "", 
    "version": "0.9.1", 
    "cheesecake_documentation_id": null, 
    "description": "django-sitemessage\n==================\nhttps://github.com/idlesign/django-sitemessage\n\n.. image:: https://img.shields.io/pypi/v/django-sitemessage.svg\n    :target: https://pypi.python.org/pypi/django-sitemessage\n\n.. image:: https://img.shields.io/pypi/l/django-sitemessage.svg\n    :target: https://pypi.python.org/pypi/django-sitemessage\n\n.. image:: https://img.shields.io/coveralls/idlesign/django-sitemessage/master.svg\n    :target: https://coveralls.io/r/idlesign/django-sitemessage\n\n.. image:: https://travis-ci.org/idlesign/django-sitemessage.svg?branch=master\n    :target: https://travis-ci.org/idlesign/django-sitemessage\n\n.. image:: https://landscape.io/github/idlesign/django-sitemessage/master/landscape.svg?style=flat\n   :target: https://landscape.io/github/idlesign/django-sitemessage/master\n\n\n\nDescription\n-----------\n\n*Reusable application for Django introducing a message delivery framework.*\n\n\nSchedule and send messages with several easy steps, using concepts of:\n\n* **Messengers** - clients for various protocols (smtp, jabber, twitter, telegram, facebook, vkontakte, etc.);\n\n* **Message Types** - message classes exposing message composition logic (plain text, html, etc.).\n\n\n1. Configure messengers for your project (create `sitemessages.py` in one of your apps):\n\n.. code-block:: python\n\n    from sitemessage.toolbox import register_messenger_objects, register_builtin_message_types\n    from sitemessage.messengers.smtp import SMTPMessenger\n\n    register_messenger_objects(\n        # Here we register only one messenger to deliver emails.\n        SMTPMessenger('user1@host.com', 'user1', 'user1password', host='smtp.host.com', use_tls=True)\n    )\n\n    # And register built-in message types we'd use (for Django < 1.7).\n    register_builtin_message_types()\n\n\n2. Schedule messages for delivery when and where needed (e.g. in a view):\n\n.. code-block:: python\n\n    from sitemessage.shortcuts import schedule_email\n\n    def send_mail_view(request):\n        ...\n\n        # Suppose `user_model` is a recipient Django User model instance.\n        user1_model = ...\n\n        # We pass `request.user` into `sender` to keep track of senders.\n        schedule_email('Message from sitemessage.', [user1_model, 'user2@host.com'], sender=request.user)\n\n        ...\n\n\n3. Periodically run Django management command from wherever you like (cli, cron, Celery, etc.):\n\n    ./manage.py sitemessage_send_scheduled\n\n\nAnd that's only the tip of `sitemessage` iceberg, read the docs %)\n\n\nDocumentation\n-------------\n\nhttp://django-sitemessage.readthedocs.org/\n", 
    "tox": true, 
    "lcname": "django-sitemessage", 
    "bugtrack_url": null, 
    "github": true, 
    "coveralls": true, 
    "name": "django-sitemessage", 
    "license": "BSD 3-Clause License", 
    "travis_ci": true, 
    "github_project": "django-sitemessage", 
    "summary": "Reusable application for Django introducing a message delivery framework", 
    "split_keywords": [], 
    "author_email": "idlesign@yandex.ru", 
    "urls": [
        {
            "has_sig": false, 
            "upload_time": "2018-03-24T05:45:47", 
            "comment_text": "", 
            "python_version": "source", 
            "url": "https://pypi.python.org/packages/ff/f0/cf7d03f1b11128e17d2f44f56ac0a321e59a8beb3ba415c374d6d581fb29/django-sitemessage-0.9.1.tar.gz", 
            "md5_digest": "2cbe37c0a6993d7017e5479778a60820", 
            "downloads": 0, 
            "filename": "django-sitemessage-0.9.1.tar.gz", 
            "packagetype": "sdist", 
            "path": "ff/f0/cf7d03f1b11128e17d2f44f56ac0a321e59a8beb3ba415c374d6d581fb29/django-sitemessage-0.9.1.tar.gz", 
            "digests": {
                "sha256": "d921e2b92e7c8fe54142e5816d341fda69a64dffe3034e2560f2eae3ae185715", 
                "md5": "2cbe37c0a6993d7017e5479778a60820"
            }, 
            "sha256_digest": "d921e2b92e7c8fe54142e5816d341fda69a64dffe3034e2560f2eae3ae185715", 
            "size": 51433
        }, 
        {
            "has_sig": false, 
            "upload_time": "2018-03-24T05:45:49", 
            "comment_text": "", 
            "python_version": "2.7", 
            "url": "https://pypi.python.org/packages/2e/df/378d95636c3636f785660e599b880c4b8554c2a0f8b00bab57cd66ccb1af/django_sitemessage-0.9.1-py2.py3-none-any.whl", 
            "md5_digest": "d4256cc599d64e6030d5b879a0b180eb", 
            "downloads": 0, 
            "filename": "django_sitemessage-0.9.1-py2.py3-none-any.whl", 
            "packagetype": "bdist_wheel", 
            "path": "2e/df/378d95636c3636f785660e599b880c4b8554c2a0f8b00bab57cd66ccb1af/django_sitemessage-0.9.1-py2.py3-none-any.whl", 
            "digests": {
                "sha256": "d6f5e212cb402ca7783a8cb046bd1ae7d0c275c0ac1aaa816499d35f0dbc7313", 
                "md5": "d4256cc599d64e6030d5b879a0b180eb"
            }, 
            "sha256_digest": "d6f5e212cb402ca7783a8cb046bd1ae7d0c275c0ac1aaa816499d35f0dbc7313", 
            "size": 53487
        }
    ], 
    "_id": null, 
    "cheesecake_installability_id": null
}