chat for projects we help maintain @ ckc
Project description
django-chit-chat
chat for projects we help maintain @ ckc
installing
pip install django-chit-chat
# settings.py
INSTALLED_APPS = (
"django.contrib.auth",
"django.contrib.contenttypes",
"django.contrib.sessions",
"django.contrib.staticfiles",
# ... add chit_chat
"chit_chat",
)
# routing.py
from channels.auth import AuthMiddlewareStack
from django.core.asgi import get_asgi_application
from channels.routing import ProtocolTypeRouter, URLRouter
import chit_chat.routing
application = ProtocolTypeRouter({
'http': get_asgi_application(),
'websocket': AuthMiddlewareStack(
URLRouter(
chit_chat.routing.websocket_urlpatterns
)
),
})
# urls.py
from rest_framework import routers
from chit_chat.viewsets import RoomViewSet
router = routers.SimpleRouter()
router.register('chatrooms', RoomViewSet)
urlpatterns = router.urls
distributing and releasing
# Update version in setup.cfg
./setup.py sdist
twine upload dist/*
# Commit and push the version update in setup.cfg
# Publish vX.X.X release on GitHub with a description.
tests
$ docker build -t django-chit-chat . && docker run django-chit-chat pytest
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
django-chit-chat-0.0.3.tar.gz
(11.5 kB
view hashes)
Built Distribution
Close
Hashes for django_chit_chat-0.0.3-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 5bcd151260950f0366df7d0f9fc13ee0169d237f7de00a9b1975c744c42653ab |
|
MD5 | a7725a6ebbaee35ba215a5a19bfbf6cf |
|
BLAKE2b-256 | bb4dc2c385e43a4a337cc137c2af2505128ac1635d249ff9aac5827b348f3bc6 |