All Projects → dmonn → Django Directmessages

dmonn / Django Directmessages

Licence: other
Django-directmessages is a low-level and easy-to-use Django App to manage simple directmessages.

Programming Languages

python
139335 projects - #7 most used programming language

Projects that are alternatives of or similar to Django Directmessages

Django instagram
Photo sharing social media site built with Python/Django. Based on Instagram's design.
Stars: ✭ 165 (+385.29%)
Mutual labels:  django, messaging
Lunch With Channels
Stars: ✭ 32 (-5.88%)
Mutual labels:  django
Django Spectator
A Django app to track book reading, and event going.
Stars: ✭ 28 (-17.65%)
Mutual labels:  django
Note App Django Vue Javascript
An example of a note application using django and vue.js
Stars: ✭ 31 (-8.82%)
Mutual labels:  django
Django Starcross Gallery
Django Gallery app with justified image layout, infinite scrolling and drag & drop support
Stars: ✭ 28 (-17.65%)
Mutual labels:  django
Django Countries
A Django application that provides country choices for use with forms, flag icons static files, and a country field for models.
Stars: ✭ 962 (+2729.41%)
Mutual labels:  django
Django S3 Like Storage
Your Own Amazon S3 Django Storage
Stars: ✭ 28 (-17.65%)
Mutual labels:  django
Sujinlee.me
Sujin's Personal Website
Stars: ✭ 33 (-2.94%)
Mutual labels:  django
Django Djeddit
Minimalistic Reddit clone developed as a Django reusable app
Stars: ✭ 32 (-5.88%)
Mutual labels:  django
Django On Docker Letsencrypt
Securing a Containerized Django Application with Let's Encrypt
Stars: ✭ 31 (-8.82%)
Mutual labels:  django
Django Auth Example
Sample project for my talk at DjangoCongress JP 2018.
Stars: ✭ 30 (-11.76%)
Mutual labels:  django
Ihealth site
iHealth 项目的后台程序(一个基于 Django 和 MongoDB 的 Web 后端)
Stars: ✭ 29 (-14.71%)
Mutual labels:  django
Django Precise Bbcode
A Django application for parsing, displaying and editing BBCodes-based text contents.
Stars: ✭ 31 (-8.82%)
Mutual labels:  django
Mangosta Ios
MongooseIM client for iOS
Stars: ✭ 28 (-17.65%)
Mutual labels:  messaging
Djangorestframework Mvt
Serve Mapbox Vector Tiles with Django and Postgres
Stars: ✭ 33 (-2.94%)
Mutual labels:  django
Djangorestframework Book
Django REST framework 3 中文文档, API参考, 最佳实践指南
Stars: ✭ 28 (-17.65%)
Mutual labels:  django
Bedrock
Making mozilla.org awesome, one pebble at a time
Stars: ✭ 953 (+2702.94%)
Mutual labels:  django
Supervisoradmin
supervisor admin is a centralized management tools written by django
Stars: ✭ 31 (-8.82%)
Mutual labels:  django
Staruml Django
This extension for StarUML(http://staruml.io) support to generate Django model code from UML model. Install this extension from Extension Manager of StarUML. Based on (https://github.com/niklauslee/staruml-python)
Stars: ✭ 34 (+0%)
Mutual labels:  django
Django Two Factor Auth
Complete Two-Factor Authentication for Django providing the easiest integration into most Django projects.
Stars: ✭ 967 (+2744.12%)
Mutual labels:  django

Django-Directmessages

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

  • Sending of private 1-to-1 messages between users.
  • Listing unread messages for a given user.
  • Read a given message
  • Get all conversation partners/contacted users for a given user
  • Read a whole conversation between two users.

Requirements

Django >= 1.5 is supported

Installation

  1. pip install django-directmessages
  2. add "directmessages" to INSTALLED_APPS and run python manage.py migrate.

Usage

Import the Message Management API on top of your views.py ::

from directmessages.apps import Inbox
  • Send message: Inbox.send_message(from_user, to_user, message)
  • List all unread messages: Inbox.get_unread_messages(user)
  • Read a message (and mark as read): Inbox.read_message(message)
  • Print a message as : : Inbox.read_message_formatted(message)
  • Print a list of all conversation partners for a user: Inbox.get_conversations(users)
  • Get a conversation between two users: Inbox.get_conversation(user1, user2, _limit_, _reversed_, _mark_read_)
    • Limit (Int: optional): Instead of getting the whole conversation, get the first 50 (depends on reversed)
    • Reversed (Bool: optional): Usually the 'limit'-param gives back the first x messages, if you put Reversed to True, limit will give back the x latest messages.
    • Mark_Read (Bool: optional): Mark all messages in conversation as read

Signals

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.

Contributing

Bug reports, patches and fixes are always welcome!

To Do

  • Add some security functions (e.g checking if user is allowed to read a message)
  • Add some custom exceptions (e.g. when no message was found)
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].