From 1ada7d14f769744efdfd19c207a83ff3a850f177 Mon Sep 17 00:00:00 2001 From: Richard de Wit Date: Tue, 14 Jan 2020 16:27:23 +0100 Subject: [PATCH] Add ASGI support Then in your project's `asgi.py` file use this: ```python from configurations.asgi import get_asgi_application application = get_asgi_application() ``` --- configurations/asgi.py | 14 ++++++++++++++ 1 file changed, 14 insertions(+) create mode 100644 configurations/asgi.py diff --git a/configurations/asgi.py b/configurations/asgi.py new file mode 100644 index 0000000..b257d60 --- /dev/null +++ b/configurations/asgi.py @@ -0,0 +1,14 @@ +from . import importer + +importer.install() + +try: + from django.core.asgi import get_asgi_application +except ImportError: # pragma: no cover + from django.core.handlers.asgi import ASGIHandler + + def get_asgi_application(): # noqa + return ASGIHandler() + +# this is just for the crazy ones +application = get_asgi_application()