Skip to main content

A chat application for Django

Project description

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

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

django-rechat-0.2.0.tar.gz (22.4 kB view details)

Uploaded Source

Built Distribution

django_rechat-0.2.0-py3-none-any.whl (24.6 kB view details)

Uploaded Python 3

File details

Details for the file django-rechat-0.2.0.tar.gz.

File metadata

  • Download URL: django-rechat-0.2.0.tar.gz
  • Upload date:
  • Size: 22.4 kB
  • Tags: Source
  • Uploaded using 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

File hashes

Hashes for django-rechat-0.2.0.tar.gz
Algorithm Hash digest
SHA256 474781afdc8af2219a0de1b7a4f99bcaf4efeb5e52d5e7172ba4f8ad8a81f13b
MD5 0fafc940cee14925c8558d8e322eac46
BLAKE2b-256 9316d14af563d21a76b871231cb6075baff5aac2778269dad2e7f89164791ba9

See more details on using hashes here.

File details

Details for the file django_rechat-0.2.0-py3-none-any.whl.

File metadata

  • Download URL: django_rechat-0.2.0-py3-none-any.whl
  • Upload date:
  • Size: 24.6 kB
  • Tags: Python 3
  • Uploaded using 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

File hashes

Hashes for django_rechat-0.2.0-py3-none-any.whl
Algorithm Hash digest
SHA256 5de722eb5e7a863d55d27bb08cf17be97bcabf23062cbf320f4c40ab775d7633
MD5 f13713e15cde06aa71094064c81bfa8e
BLAKE2b-256 36e68e01e4bf3e3322964d58d57e0681e3f83921cf0b1835de978bd257f53ddd

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page