This commit is contained in:
Eugene Pankov
2021-07-06 23:45:52 +02:00
parent 6bd5aff8b7
commit 3ff34b2618
36 changed files with 76 additions and 83 deletions

16
tabby/asgi.py Normal file
View File

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