mirror of
https://github.com/jazzband/django-configurations.git
synced 2026-03-16 22:20:27 +00:00
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() ```
This commit is contained in:
parent
d89fe5a2cb
commit
1ada7d14f7
1 changed files with 14 additions and 0 deletions
14
configurations/asgi.py
Normal file
14
configurations/asgi.py
Normal file
|
|
@ -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()
|
||||
Loading…
Reference in a new issue