13👍
✅
You appear to be missing the websocket
key. The tutorial says to add following imports and add the websocket
key in mysite/routing.py
.
from channels.auth import AuthMiddlewareStack
from channels.routing import ProtocolTypeRouter, URLRouter
import chat.routing
application = ProtocolTypeRouter({
# (http->django views is added by default)
'websocket': AuthMiddlewareStack(
URLRouter(
chat.routing.websocket_urlpatterns
)
),
})
Source:stackexchange.com