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
# change version in setup.cfg
$ ./setup.py sdist
$ twine upload dist/*
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.1.tar.gz
(11.6 kB
view details)
File details
Details for the file django-chit-chat-0.0.1.tar.gz
.
File metadata
- Download URL: django-chit-chat-0.0.1.tar.gz
- Upload date:
- Size: 11.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.1.1 pkginfo/1.7.0 requests/2.25.1 setuptools/56.1.0 requests-toolbelt/0.9.1 tqdm/4.61.0 CPython/3.8.2
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 22f2cd7bb6daf924036445b4f8c7c6c9c2d1415721dcd72ab9c6d92e6bbe9e4e |
|
MD5 | 02216c92ca6e939f229633e9afcfbd00 |
|
BLAKE2b-256 | 719673e625f10e03c0a4f467e8b1306ef0349736e8109a2b7d14b9cbf2b018ce |