Django Rechat
Chat application for Django using websockets
Install
pip install django-rechat
Add "rechat" and "instant" to INSTALLED_APPS in settings and update urls.py:
urlpatterns = [
# ...
path("instant/", include("instant.urls")),
path("rechat/", include("rechat.urls")),
]
Install the websockets server: quickstart
Usage
An Alpinejs frontend is available. To use the rechat templates create your own index template (here with Tailwind css classes):
{% extends "base.html" %}
{% block content %}
{% include "rechat/init.html" %}
<div class="flex flex-row h-full" x-init="$rechat.hxget('{% url 'rechat-rooms' %}', '#rooms')">
<div id="rooms" class="w-2/12 h-full p-3 border-r border-gray-200 bg-slate-100">
Loading rooms ..
</div>
<div id="room">
<div class="p-5 text-stone-400">Select a chatroom</div>
</div>
</div>
{% endblock %}
Todo
- Add a persistence layer option
- Group level authorizations and rooms
- Rate limits
- Channel admin, kick/ban
- Add a presence widget to show users in the chat
Metadata
Release files for django-rechat 0.2.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| django-rechat-0.2.0.tar.gz | 22.4 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| django_rechat-0.2.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 47.0 kB
Release files / django-rechat-0.2.0.tar.gz
| Download URL | django-rechat-0.2.0.tar.gz |
|---|---|
| Size | 22.4 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
474781afdc8af2219a0de1b7a4f99bcaf4efeb5e52d5e7172ba4f8ad8a81f13b
|
|
BLAKE2b-256 checksum How to use checksums |
9316d14af563d21a76b871231cb6075baff5aac2778269dad2e7f89164791ba9
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.4.1 importlib_metadata/4.3.1 pkginfo/1.7.0 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.61.0 CPython/3.8.10
|
Release files / django_rechat-0.2.0-py3-none-any.whl
| Download URL | django_rechat-0.2.0-py3-none-any.whl |
|---|---|
| Size | 24.6 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
5de722eb5e7a863d55d27bb08cf17be97bcabf23062cbf320f4c40ab775d7633
|
|
BLAKE2b-256 checksum How to use checksums |
36e68e01e4bf3e3322964d58d57e0681e3f83921cf0b1835de978bd257f53ddd
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.4.1 importlib_metadata/4.3.1 pkginfo/1.7.0 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.61.0 CPython/3.8.10
|