Django one-to-one Websocket-based Asyncio-handled chat, developed by Bearle team
Project description
=============================================
:sunglasses: django-private-chat :sunglasses:
=============================================
.. image:: https://badge.fury.io/py/django-private-chat.svg
:target: https://badge.fury.io/py/django-private-chat
.. image:: https://travis-ci.org/Bearle/django-private-chat.svg?branch=master
:target: https://travis-ci.org/Bearle/django-private-chat
.. image:: https://codecov.io/gh/Bearle/django-private-chat/branch/master/graph/badge.svg
:target: https://codecov.io/gh/Bearle/django-private-chat
Django one-to-one Websocket-based Asyncio-handled chat, developed by Bearle team
.. image:: https://github.com/Bearle/django-private-chat/blob/dev/screenshots/screen_1.jpg?raw=true
Documentation
-------------
The full documentation will be (soon) at https://django-private-chat.readthedocs.io , for now just check the docstrings =)
Example project
---------------
You can check out our example project by cloning the repo and heading into example/ directory.
There is a README file for you to check, initial data to check out the chat included.
Customize the templates
-----------------------
How to customize the template?
Just copy::
venv/lib/pythonX.X/site-packages/django_private_chat/templates/django_private_chat/dialogs.html
to
yourapp/templates/django_private_chat/dialogs.html
And feel free to edit it as you like!
We intentionally left the JS code inside for it to be editable easily.
Exsiting project 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
.. code-block:: python
python manage.py run_chat_server
or run
.. code-block:: python
python manage.py run_chat_server_uvloop
Add it to your `INSTALLED_APPS`:
.. code-block:: python
INSTALLED_APPS = (
...
'django_private_chat',
...
)
Add the server & port for your asyncio server to settings:
.. code-block:: python
CHAT_WS_SERVER_HOST = 'localhost'
CHAT_WS_SERVER_PORT = 5002
It is possible to change messages datetime format using
.. code-block:: python
DATETIME_FORMAT
Add django-private-chat's URL patterns:
.. code-block:: python
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
--------
-:white_check_mark: Uses current app model (get_user_model() and settings.AUTH_USER_MODEL)
-:white_check_mark: Translatable (uses ugettext and {% trans %} )
-:white_check_mark: One-to-one user chat
-:white_check_mark: Works using WebSockets
-:white_check_mark: Displays online/offline status
-:white_check_mark: Display typing/not typing status
-:white_check_mark: Soft deletable message model - be sure to keep messages to comply with message-keeping laws
-:white_check_mark: Flash the dialog button when the user you are not currently talking to wrote you a message
-:point_right: TODO: add a dialog to the list when new one started
-:point_right: TODO: add user-not-found and other alerts
-:point_right: 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:
* Cookiecutter_
* `cookiecutter-djangopackage`_
.. _Cookiecutter: https://github.com/audreyr/cookiecutter
.. _`cookiecutter-djangopackage`: https://github.com/pydanny/cookiecutter-djangopackage
History
-------
0.1.5 (2017-03-11)
++++++++++++++++++
* Added flashing other user button when he sent you a message and you're in another dialog
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.
:sunglasses: django-private-chat :sunglasses:
=============================================
.. image:: https://badge.fury.io/py/django-private-chat.svg
:target: https://badge.fury.io/py/django-private-chat
.. image:: https://travis-ci.org/Bearle/django-private-chat.svg?branch=master
:target: https://travis-ci.org/Bearle/django-private-chat
.. image:: https://codecov.io/gh/Bearle/django-private-chat/branch/master/graph/badge.svg
:target: https://codecov.io/gh/Bearle/django-private-chat
Django one-to-one Websocket-based Asyncio-handled chat, developed by Bearle team
.. image:: https://github.com/Bearle/django-private-chat/blob/dev/screenshots/screen_1.jpg?raw=true
Documentation
-------------
The full documentation will be (soon) at https://django-private-chat.readthedocs.io , for now just check the docstrings =)
Example project
---------------
You can check out our example project by cloning the repo and heading into example/ directory.
There is a README file for you to check, initial data to check out the chat included.
Customize the templates
-----------------------
How to customize the template?
Just copy::
venv/lib/pythonX.X/site-packages/django_private_chat/templates/django_private_chat/dialogs.html
to
yourapp/templates/django_private_chat/dialogs.html
And feel free to edit it as you like!
We intentionally left the JS code inside for it to be editable easily.
Exsiting project 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
.. code-block:: python
python manage.py run_chat_server
or run
.. code-block:: python
python manage.py run_chat_server_uvloop
Add it to your `INSTALLED_APPS`:
.. code-block:: python
INSTALLED_APPS = (
...
'django_private_chat',
...
)
Add the server & port for your asyncio server to settings:
.. code-block:: python
CHAT_WS_SERVER_HOST = 'localhost'
CHAT_WS_SERVER_PORT = 5002
It is possible to change messages datetime format using
.. code-block:: python
DATETIME_FORMAT
Add django-private-chat's URL patterns:
.. code-block:: python
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
--------
-:white_check_mark: Uses current app model (get_user_model() and settings.AUTH_USER_MODEL)
-:white_check_mark: Translatable (uses ugettext and {% trans %} )
-:white_check_mark: One-to-one user chat
-:white_check_mark: Works using WebSockets
-:white_check_mark: Displays online/offline status
-:white_check_mark: Display typing/not typing status
-:white_check_mark: Soft deletable message model - be sure to keep messages to comply with message-keeping laws
-:white_check_mark: Flash the dialog button when the user you are not currently talking to wrote you a message
-:point_right: TODO: add a dialog to the list when new one started
-:point_right: TODO: add user-not-found and other alerts
-:point_right: 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:
* Cookiecutter_
* `cookiecutter-djangopackage`_
.. _Cookiecutter: https://github.com/audreyr/cookiecutter
.. _`cookiecutter-djangopackage`: https://github.com/pydanny/cookiecutter-djangopackage
History
-------
0.1.5 (2017-03-11)
++++++++++++++++++
* Added flashing other user button when he sent you a message and you're in another dialog
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
django-private-chat-0.1.5.tar.gz
(14.6 kB
view hashes)
Built Distribution
Close
Hashes for django-private-chat-0.1.5.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | f1056f2cdb86f1694d5c87e7dd51969fec251b960580424b4185f229a43462fb |
|
MD5 | 7f513c28b0e90fce8b3c29f3774cf9b8 |
|
BLAKE2b-256 | 0dc164d78b16fd7fed9a6beb4c379ba996ead6dbe551bbf1dc09c45173c9e802 |
Close
Hashes for django_private_chat-0.1.5-py2.py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 783e0c8dffcc9d6b0dbfe8663ddd09698730a99c23de87fdbe798ae0c97b331c |
|
MD5 | 491957227cf722da70d64d3643fcd632 |
|
BLAKE2b-256 | 153eaa2e06e61d5342b118b35653f5d1a3cd5aad1db4caf8673d1884c10b42e4 |