This commit is contained in:
Eugene Pankov
2021-07-26 17:56:35 +02:00
parent 151a2fab60
commit cbd8a93909
15 changed files with 84 additions and 327 deletions

View File

@@ -4,15 +4,9 @@ import os
os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'tabby.settings')
django.setup()
from channels.auth import AuthMiddlewareStack
from channels.routing import ProtocolTypeRouter, URLRouter
from channels.routing import ProtocolTypeRouter
from django.core.asgi import get_asgi_application
from .app.urls import websocket_urlpatterns
application = ProtocolTypeRouter({
'http': get_asgi_application(),
'websocket': AuthMiddlewareStack(
URLRouter(websocket_urlpatterns),
),
})