bornhack-website/src/bornhack/routing.py

15 lines
350 B
Python

from django.conf.urls import url
from channels.routing import ProtocolTypeRouter, URLRouter
from channels.auth import AuthMiddlewareStack
from program.consumers import ScheduleConsumer
application = ProtocolTypeRouter(
{
"websocket": AuthMiddlewareStack(
URLRouter([url(r"^schedule/", ScheduleConsumer)])
)
}
)