Django SocketIO Chat using python-socketio
Project description
Django SocketIO Chat
Simple chat using python-socketio,
and using django-allauth-simple-ui
Simple usage
Please check the README.md to know how to use django-allauth-simple-ui Alternatively, you can check the testproject for more details.
- Install by running the following command
pip install django-socketio-chat
- Add the following settings to your
settings.py
file
INSTALLED_APPS = [
"django_socketio_chat",
# etc
]
ALLAUTH_UI = dict(
ADAPTER="django_socketio_chat.adapter.CustomUserAdapter",
# etc
)
- Add the Chat URLs to your
urls.py
file
from django.urls import path, include
urlpatterns = [
path('chat/', include("django_socketio_chat.urls")),
]
- Config
wsgi.py
to run SocketIO server
import os
import django
os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'testproject.settings')
django.setup()
from socketio import WSGIApp
from django.core.wsgi import get_wsgi_application
from django_socketio_chat.server import ChatServer
application = WSGIApp(ChatServer().sio, get_wsgi_application())
- Collect Static files
python manage.py collectstatic --no-input
6Migrate the database
python manage.py migrate
- Using wsgi to run the project
gunicorn testproject.wsgi:application -b 0.0.0.0:8000 -w 1 -k eventlet --reload
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
File details
Details for the file django_socketio_chat-0.1.0.tar.gz
.
File metadata
- Download URL: django_socketio_chat-0.1.0.tar.gz
- Upload date:
- Size: 12.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.8.3 CPython/3.10.12 Linux/6.8.0-45-generic
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 81c5823321dd5378fb21bc0a4f1db1305114ef96108a1b9be2e12d1b0054e1bf |
|
MD5 | d8681ab0e6affed4aab4be6ff144f7c5 |
|
BLAKE2b-256 | 187fb9975dbb478252ad6206230798be129b8e9e02a47cc166b5ec877e21d0bd |
File details
Details for the file django_socketio_chat-0.1.0-py3-none-any.whl
.
File metadata
- Download URL: django_socketio_chat-0.1.0-py3-none-any.whl
- Upload date:
- Size: 14.9 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.8.3 CPython/3.10.12 Linux/6.8.0-45-generic
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | f9df0808881deabe9ee46bdf53cbcc10a43ccbd09bf1a1c3fa4341b704662989 |
|
MD5 | 928e860aebdc3958b536eb76e6e815d6 |
|
BLAKE2b-256 | 5070c36b536dc3d90a306d2e2e5fea84e2484ed2cf4ef592b88f70b66c904996 |