{"id":21997609,"url":"https://github.com/bearle/django-private-chat","last_synced_at":"2025-05-16T13:07:52.197Z","repository":{"id":17280912,"uuid":"80574300","full_name":"Bearle/django-private-chat","owner":"Bearle","description":"(Deprecated - Please check out https://github.com/Bearle/django_private_chat2) Django one-to-one Websocket-based Asyncio-handled chat, developed by Bearle team","archived":false,"fork":false,"pushed_at":"2022-12-26T21:30:17.000Z","size":1186,"stargazers_count":424,"open_issues_count":40,"forks_count":132,"subscribers_count":25,"default_branch":"dev","last_synced_at":"2024-04-14T06:22:16.203Z","etag":null,"topics":["asyncio","chat","dialog","django","python3","websockets"],"latest_commit_sha":null,"homepage":"","language":"HTML","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"isc","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Bearle.png","metadata":{"files":{"readme":"README.rst","changelog":"HISTORY.rst","contributing":"CONTRIBUTING.rst","funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2017-01-31T23:50:53.000Z","updated_at":"2024-04-11T16:53:24.000Z","dependencies_parsed_at":"2023-01-13T19:15:16.763Z","dependency_job_id":null,"html_url":"https://github.com/Bearle/django-private-chat","commit_stats":null,"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Bearle%2Fdjango-private-chat","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Bearle%2Fdjango-private-chat/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Bearle%2Fdjango-private-chat/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Bearle%2Fdjango-private-chat/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Bearle","download_url":"https://codeload.github.com/Bearle/django-private-chat/tar.gz/refs/heads/dev","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248544029,"owners_count":21121878,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["asyncio","chat","dialog","django","python3","websockets"],"created_at":"2024-11-29T22:17:24.263Z","updated_at":"2025-04-12T09:20:52.462Z","avatar_url":"https://github.com/Bearle.png","language":"HTML","funding_links":[],"categories":[],"sub_categories":[],"readme":"=============================================\n:stop_sign: Deprecated :stop_sign:\n=============================================\n\nThis project is deprecated. A new and improved version has been released:\n\nhttps://github.com/Bearle/django_private_chat2\n\nPlease check it out.\n\n\n=============================================\n:sunglasses: django-private-chat :sunglasses:\n=============================================\n\n.. image:: https://badge.fury.io/py/django-private-chat.svg\n    :target: https://badge.fury.io/py/django-private-chat\n\n.. image:: https://travis-ci.org/Bearle/django-private-chat.svg?branch=master\n    :target: https://travis-ci.org/Bearle/django-private-chat\n\n.. image:: https://codecov.io/gh/Bearle/django-private-chat/branch/master/graph/badge.svg\n    :target: https://codecov.io/gh/Bearle/django-private-chat\n\nPlease also check out our another package https://github.com/Bearle/django_mail_admin\n\nDjango one-to-one Websocket-based Asyncio-handled chat, developed by Bearle team\n\n.. image:: https://github.com/Bearle/django-private-chat/blob/dev/screenshots/screen_1.jpg?raw=true\n\nImportant Notes\n---------------\n\nThis app uses separate management command, run_chat_server for running Websockets in Django context. It is intended to be used with something like Supervisor or Systemd to run asyncio webserver as a separate one from Django.\nWe didn't want our app to be limited to be used together with Django Channels - that's why we did it that way.\n\nYou can find an example Systemd config to run it as a service at https://github.com/Bearle/django-private-chat/blob/dev/example.service\n\nP.S. Don't forget to change CHAT_WS_SERVER_HOST \u0026\u0026 CHAT_WS_SERVER_PORT \u0026\u0026 CHAT_WS_SERVER_PROTOCOL settings!\n\nDocumentation\n-------------\n\nThe full documentation is (finally) at  https://django-private-chat.readthedocs.io . You can also check the docstrings \u0026 this readme.\n\nExample project\n---------------\n\nYou can check out our example project by cloning the repo and heading into example/ directory.\nThere is a README file for you to check, initial data to check out the chat included.\n\n\nCustomize the templates\n-----------------------\n\nHow to customize the template?\nJust copy::\n\n    venv/lib/pythonX.X/site-packages/django_private_chat/templates/django_private_chat/dialogs.html\n    to\n    yourapp/templates/django_private_chat/dialogs.html\n\n\nAnd feel free to edit it as you like!\nWe intentionally left the JS code inside for it to be editable easily.\n\n\nExisting project quickstart\n---------------------------\n\nInstall django-private-chat::\n\n    pip install django-private-chat\n\nMigrate::\n\n    python manage.py migrate django_private_chat\n\nNote: you can use this package with or without uvloop, just run either\n\n.. code-block:: python\n\n    python manage.py run_chat_server\n\nor run\n\n.. code-block:: python\n\n    python manage.py run_chat_server_uvloop\n\n\n\nAdd it to your `INSTALLED_APPS`:\n\n.. code-block:: python\n\n    INSTALLED_APPS = (\n        ...\n        'django_private_chat',\n        ...\n    )\n\nAdd the server \u0026 port for your asyncio server to settings:\n\n.. code-block:: python\n\n    CHAT_WS_SERVER_HOST = 'localhost'\n    CHAT_WS_SERVER_PORT = 5002\n    CHAT_WS_SERVER_PROTOCOL = 'ws'\n\nIt is possible to change messages datetime format using\n\n.. code-block:: python\n\n    DATETIME_FORMAT\n\nAdd django-private-chat's URL patterns:\n\n.. code-block:: python\n\n    from django_private_chat import urls as django_private_chat_urls\n\n\n    urlpatterns = [\n        ...\n        url(r'^', include('django_private_chat.urls')),\n        ...\n    ]\n\nAdd\n\n.. code-block:: python\n\n    {% block extra_js %}{% endblock extra_js %}\n\nto your base template\n\nNow you can start a dialog using ::\n\n    /dialogs/some_existing_username\n\n\nTo create a WSS (TLS) server instead:\n\n.. code-block:: python\n\n    python manage.py run_chat_server \"path/to/cert.pem\"\n\n\n(also works with uvloop).\nThe \"cert.pem\" file should be a plaintext PEM file containing first a private key, then a certificate (may be a concatenation of a .key and a .crt file).\nPlease note that wss will use TLSv1 by default for python 3.5 \u0026 3.4 and will use ssl.PROTOCOL_TLS_SERVER for 3.6 and above.\nFeatures\n--------\n\n-:white_check_mark: Uses current app model (get_user_model() and settings.AUTH_USER_MODEL)\n\n-:white_check_mark: Translatable (uses ugettext and {% trans %} )\n\n-:white_check_mark: One-to-one user chat\n\n-:white_check_mark: Works using WebSockets\n\n-:white_check_mark: Works (optionally) using WSS (TLS) connections (disclaimer - security not guaranteed)\n\n-:white_check_mark: Displays online/offline status\n\n-:white_check_mark: Display typing/not typing status\n\n-:white_check_mark: Soft deletable message model - be sure to keep messages to comply with message-keeping laws\n\n-:white_check_mark: Flash the dialog button when the user you are not currently talking to wrote you a message\n\n-:point_right: TODO: add a dialog to the list when new one started\n\n-:point_right: TODO: add user-not-found and other alerts\n\n-:point_right: possible Redis backend intergration\n\n\nRunning Tests\n-------------\n\nDoes the code actually work?\n\n::\n\n    source \u003cYOURVIRTUALENV\u003e/bin/activate\n    (myenv) $ pip install tox\n    (myenv) $ tox\n\nCredits\n-------\n\nTools used in rendering this package:\n\n*  Cookiecutter_\n*  `cookiecutter-djangopackage`_\n\n.. _Cookiecutter: https://github.com/audreyr/cookiecutter\n.. _`cookiecutter-djangopackage`: https://github.com/pydanny/cookiecutter-djangopackage\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbearle%2Fdjango-private-chat","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbearle%2Fdjango-private-chat","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbearle%2Fdjango-private-chat/lists"}