Django Channels 'no Application Configured For Scope Type 'websocket''
I am trying to implement a chat with Django and channels according to this tutorial (http://channels.readthedocs.io/en/latest/tutorial/part_2.html). I add channels and a chat app t
Solution 1:
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
)
),
})
Post a Comment for "Django Channels 'no Application Configured For Scope Type 'websocket''"