asgi.py 386 B

12345678910111213
  1. import django
  2. from django.core.handlers.asgi import ASGIHandler
  3. def get_asgi_application():
  4. """
  5. The public interface to Django's ASGI support. Return an ASGI 3 callable.
  6. Avoids making django.core.handlers.ASGIHandler a public API, in case the
  7. internal implementation changes or moves in the future.
  8. """
  9. django.setup(set_prefix=False)
  10. return ASGIHandler()