OpenSlides/openslides/routing.py

16 lines
390 B
Python
Raw Normal View History

from channels.routing import ProtocolTypeRouter, URLRouter
from django.conf.urls import url
2018-08-22 07:59:22 +02:00
from openslides.utils.consumers import SiteConsumer
from openslides.utils.middleware import AuthMiddlewareStack
application = ProtocolTypeRouter({
# WebSocket chat handler
"websocket": AuthMiddlewareStack(
URLRouter([
url(r"^ws/$", SiteConsumer),
])
)
})