This commit is contained in:
2025-07-15 19:28:43 +08:00
parent 3e4c207cfc
commit 872ec5f7af
3 changed files with 12 additions and 23 deletions

View File

@@ -9,16 +9,9 @@ https://docs.djangoproject.com/en/5.1/howto/deployment/asgi/
import os
from channels.routing import ProtocolTypeRouter, URLRouter
from channels.auth import AuthMiddlewareStack
from django.core.asgi import get_asgi_application
from .urls import ws_urlpatterns
os.environ.setdefault("DJANGO_SETTINGS_MODULE", "api.settings")
application = ProtocolTypeRouter(
{
"http": get_asgi_application(),
# "websocket": AuthMiddlewareStack(URLRouter(ws_urlpatterns)),
}
)
application =get_asgi_application()