backend/config/asgi.py

22 lines
546 B
Python
Raw Normal View History

2021-10-28 10:12:20 +00:00
"""
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.2/howto/deployment/asgi/
"""
import os
2022-05-20 17:14:48 +00:00
from channels.routing import ProtocolTypeRouter
2021-10-28 10:12:20 +00:00
from django.core.asgi import get_asgi_application
os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'config.settings')
2022-05-20 17:14:48 +00:00
django_asgi_app = get_asgi_application()
2021-10-28 10:12:20 +00:00
2022-05-20 17:14:48 +00:00
#application = get_asgi_application()
application = ProtocolTypeRouter({
"http": django_asgi_app,
})