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.apps.DjangoPrivateChatConfig',
...
)
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.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.2.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | 7d9861d108e7752b7495fbc89f2fdcd6220f60dff4d3f7aab553c6fe81bb8acc |
|
MD5 | 0806cbea0555e6b46085129ded7cb651 |
|
BLAKE2b-256 | 889155b5681b65b513522b2eed651d35ca6befc0098cb5ddc90bde5ac889a667 |
Hashes for django_private_chat-0.1.2-py2.py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 848b62c6f77de575646e2d40d1042af0dbf143a76873d8774e0013d8b22ed086 |
|
MD5 | 1764c9b49e61e563e6f9ad75047c4825 |
|
BLAKE2b-256 | 4db8538687c24f687b2d44ce1c3f60c9626974fb16cdcbd6faad32760c4f6a52 |