""" ASGI config for config 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/3.1/howto/deployment/asgi/ """ import os from django.urls import path from django.core.asgi import get_asgi_application from channels.routing import ProtocolTypeRouter, URLRouter from registros.consumers import CrearConsumer, RegistroConsumer, AlertaConsumer os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'config.settings') application = ProtocolTypeRouter({ "http": get_asgi_application(), "websocket": URLRouter([ path('registro/', RegistroConsumer.as_asgi()), path('alerta/', AlertaConsumer.as_asgi()), path('crear/', CrearConsumer.as_asgi()), ]) })
""" ASGI config for Curiosos 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/3.2/howto/deployment/asgi/ """ import os from django.core.asgi import get_asgi_application os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'Curiosos.settings') application = get_asgi_application()
""" ASGI config for srachat 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/3.0/howto/deployment/asgi/ """ import os from django.core.asgi import get_asgi_application from django.urls import path os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'root.settings') django_asgi_app = get_asgi_application() from channels.routing import ProtocolTypeRouter, URLRouter from .token_auth import TokenAuthMiddlewareStack from srachat.routes import srachat_router application = ProtocolTypeRouter({ "http": django_asgi_app, "websocket": TokenAuthMiddlewareStack( URLRouter([ path('ws/pidor/', srachat_router), ]) ) })