[Django Channels] Disable default django HTTP routes
Is there a way to disable django HTTP routes? I've two servers
threaded and async, and I want to disable the django routes in the async
server. I read the docs, didn't find an answer.
Doing:
application = ProtocolTypeRouter({
'http': URLRouter([]),
'websocket': URLRouter(
apps.rt.routing.websocket_
urlpatterns
)
})
Gives me
[2019-02-26 19:13:22 +0000] [7] [ERROR] Exception in ASGI application
Traceback (most recent call last):
File "/usr/local/lib/python3.7/site-packages/uvicorn/protocols/http/httptools_impl.py", line 371, in run_asgi
asgi = app(self.scope)
File "/usr/local/lib/python3.7/site-packages/channels/routing.py", line 58, in __call__
return self.application_mapping[scope["type"]](scope)
File "/usr/local/lib/python3.7/site-packages/channels/routing.py", line 154, in __call__
raise ValueError("No route found for path %r." % path)
-------
and an internal error