.. image:: https://travis-ci.org/dmonn/django-directmessages.svg?branch=master :target: https://travis-ci.org/dmonn/django-directmessages
Django-Directmessages is a low-level and easy-to-use Django App to manage simple directmessages. In contrast to other Django Apps for messaging, Django-Directmessages doesn't use any type of pre-built templates and is concentrated on the programmatic usage.
Django-Directmessage is thought to be used with APIs or small apps, but can be used for any type of messaging. It featues:
Django >= 1.5 is supported
pip install django-directmessages
"directmessages"
to INSTALLED_APPS
and run python manage.py migrate
.Import the Message Management API on top of your views.py
::
from directmessages.apps import Inbox
Inbox.send_message(from_user, to_user, message)
Inbox.get_unread_messages(user)
Inbox.read_message(message)
Inbox.read_message_formatted(message)
Inbox.get_conversations(users)
Inbox.get_conversation(user1, user2, _limit_, _reversed_, _mark_read_)
You can use the following signals to extend the app for your needs
message_sent: Gets called as soon as a message is sent. Provides the Message object, the sender and the recipient as params.
message_read: Gets called as soon as a message is read: Provides the Message object, the sender and the recipient as params.
Bug reports, patches and fixes are always welcome!
Version | Tag | Published |
---|---|---|
0.9.7 | 6yrs ago | |
0.9.6 | 6yrs ago | |
0.9.4 | 6yrs ago | |
0.9.3 | 6yrs ago |