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.pyfile
INSTALLED_APPS = [
"django_socketio_chat",
# etc
]
ALLAUTH_UI = dict(
ADAPTER="django_socketio_chat.adapter.CustomUserAdapter",
# etc
)
- Add the Chat URLs to your
urls.pyfile
from django.urls import path, include
urlpatterns = [
path('chat/', include("django_socketio_chat.urls")),
]
- Config
wsgi.pyto 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
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file django_socketio_chat-0.1.1.tar.gz.
File metadata
- Download URL: django_socketio_chat-0.1.1.tar.gz
- Upload date:
- Size: 12.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.8.3 CPython/3.12.3 Linux/6.8.0-45-generic
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
9c79a70aa5bd559b403523ea2741725a9423edf0667dde0d036819080b2cc3bd
|
|
| MD5 |
3f4780872f65f2ea06355cae3fa906f7
|
|
| BLAKE2b-256 |
b7cb60a6004878f7180251cbe97fb599fd89c04826cfa1f4e5895ea28e56cdd0
|
File details
Details for the file django_socketio_chat-0.1.1-py3-none-any.whl.
File metadata
- Download URL: django_socketio_chat-0.1.1-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.12.3 Linux/6.8.0-45-generic
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
319668239c031f52968fbe0da3373e5afdc06d6ac38fad4352c2e3131a9fa3d6
|
|
| MD5 |
c1136f5cf1e75dff7528f9ee0e0f7ad2
|
|
| BLAKE2b-256 |
0facb3b232b2f0ede5aae62b88ec2a6906afe3582c91bea15adcbd89871430c2
|