27 lines
663 B
Python
27 lines
663 B
Python
"""
|
|
ASGI config for event 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
|
|
|
|
os.environ.setdefault("DJANGO_SETTINGS_MODULE", "event.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 app.website.routing import websocket_urlpatterns
|
|
|
|
|
|
application = ProtocolTypeRouter(
|
|
{
|
|
"websocket": AuthMiddlewareStack(URLRouter(websocket_urlpatterns)),
|
|
}
|
|
)
|