Django one-to-one Websocket-based Asyncio-handled chat, developed by Bearle team
Project description
Django one-to-one Websocket-based Asyncio-handled chat, developed by Bearle team
Documentation
The full documentation is at https://django-private-chat.readthedocs.io.
Quickstart
Install django-private-chat:
pip install django-private-chat
Migrate:
python manage.py migrate django-private-chat
Note: you can use this package with or without uvloop, just run either
python manage.py run_chat_server
or run
python manage.py run_chat_server_uvloop
Add it to your INSTALLED_APPS:
INSTALLED_APPS = (
...
'django_private_chat',
...
)
Add the server & port for your asyncio server to settings:
CHAT_WS_SERVER_HOST = 'localhost'
CHAT_WS_SERVER_PORT = 5002
It is possible to change messages datetime format using
DATETIME_FORMAT
Add django-private-chat’s URL patterns:
from django_private_chat import urls as django_private_chat_urls
urlpatterns = [
...
url(r'^', include('django_private_chat.urls')),
...
]
Now you can start a dialog using
/dialogs/some_existing_username
Features
Uses current app model (get_user_model() and settings.AUTH_USER_MODEL)
Translatable (uses ugettext and {% trans %} )
One-to-one user chat
Works using WebSockets
Displays online/offline status
Display typing/not typing status
Soft deletable message model - be sure to keep messages to comply with message-keeping laws
TODO: add a dialog to the list when new one started
TODO: add user-not-found and other alerts
TODO: possible Redis backend intergration
Running Tests
Does the code actually work?
source <YOURVIRTUALENV>/bin/activate (myenv) $ pip install tox (myenv) $ tox
Credits
Tools used in rendering this package:
History
0.1.4 (2017-02-12)
Added support for django 1.8,1.9
0.1.3 (2017-02-11)
Removed uvloop from requirements
0.1.2 (2017-02-11)
Fixed i18n not loaded in dialogs template bug
0.1.1 (2017-02-10)
Added migrations.
0.1.0 (2017-02-10)
First release on PyPI.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Hashes for django-private-chat-0.1.4.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | 22e8f1eed90926b2767977496f98e910dd3d78df50f3007dea7840c80c9f2f52 |
|
MD5 | 146d14e6ae619369604dafa7c4003c6b |
|
BLAKE2b-256 | 617f918378b803ede5700d7c900a6732dae7934bd898cef35dfc44e66ad449da |
Hashes for django_private_chat-0.1.4-py2.py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 016a13bf59625eada6c1b05583bfd8613571f959566449e30c711aa1fbc92978 |
|
MD5 | 6a51d16aa84c6915d1db7878c02306c4 |
|
BLAKE2b-256 | 26a03e9d1e98e82eab30fb9d0cc4dc0ce78da1cec6e5ed75caaebb4e6ed4d2f0 |