OpenSlides/openslides/routing.py
2019-01-08 21:51:52 +01:00

14 lines
371 B
Python

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