Files

33 lines
929 B
Python
Raw Permalink Normal View History

2025-04-29 15:43:53 +03:30
"""
ASGI config for Rasaddam_Backend project.
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
#
2025-09-20 16:58:24 +03:30
# from django.core.asgi import get_asgi_application # noqa
#
2025-09-20 16:58:24 +03:30
# os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'Rasaddam_Backend.settings') # noqa
#
2025-09-20 16:58:24 +03:30
# application = get_asgi_application() # noqa
2025-04-29 15:43:53 +03:30
import os
from channels.routing import ProtocolTypeRouter, URLRouter
2025-04-29 15:43:53 +03:30
from django.core.asgi import get_asgi_application
from channels.auth import AuthMiddlewareStack
from apps.authentication.websocket import routing
2025-04-29 15:43:53 +03:30
os.environ.setdefault("DJANGO_SETTINGS_MODULE", "your_project_name.settings")
2025-04-29 15:43:53 +03:30
application = ProtocolTypeRouter({
"http": get_asgi_application(),
"websocket": AuthMiddlewareStack(
URLRouter(
routing.websocket_urlpatterns
)
),
})