demo-HTML-over-WebSockets-i.../my_demo/asgi.py
Andros Fenollosa e3e1a0144c Fix bad names
2021-03-08 21:25:34 +01:00

19 lines
443 B
Python

import os
os.environ.setdefault("DJANGO_SETTINGS_MODULE", "my_demo.settings")
import django
django.setup()
from channels.auth import AuthMiddlewareStack
from channels.routing import ProtocolTypeRouter, URLRouter
from django.core.asgi import get_asgi_application
from apps.back.routing import websocket_urlpatterns
application = ProtocolTypeRouter(
{
"websocket": AuthMiddlewareStack(URLRouter(websocket_urlpatterns)),
}
)