Update dta_service/dta_service/asgi.py

This commit is contained in:
2025-07-06 17:53:51 +00:00
parent 0b1e337730
commit 95b868c7e8

View File

@@ -6,11 +6,19 @@ It exposes the ASGI callable as a module-level variable named ``application``.
For more information on this file, see
https://docs.djangoproject.com/en/5.2/howto/deployment/asgi/
"""
import os
from django.core.asgi import get_asgi_application
from channels.routing import ProtocolTypeRouter, URLRouter
from channels.auth import AuthMiddlewareStack
import core.routing
os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'dta_service.settings')
os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'config.settings')
application = get_asgi_application()
application = ProtocolTypeRouter({
"http": get_asgi_application(),
"websocket": AuthMiddlewareStack(
URLRouter(
core.routing.websocket_urlpatterns
)
),
})