asgi.py 284 B

12345678910111213
  1. """
  2. ASGI entrypoint. Configures Django and then runs the application
  3. defined in the ASGI_APPLICATION setting.
  4. """
  5. import os
  6. import django
  7. import channels.asgi
  8. os.environ.setdefault("DJANGO_SETTINGS_MODULE", "settings")
  9. django.setup()
  10. application = channels.asgi.get_channel_layer()