Skip to content

Instantly share code, notes, and snippets.

@aled1027
Last active March 5, 2023 16:44
Show Gist options
  • Save aled1027/6440371934231e4e7927a90f95ed9756 to your computer and use it in GitHub Desktop.
Save aled1027/6440371934231e4e7927a90f95ed9756 to your computer and use it in GitHub Desktop.
Simple Django ASGI
"""
ASGI Config
It exposes the ASGI callable as a module-level variable named ``application``.
For more information on this file, see
https://docs.djangoproject.com/en/4.1/howto/deployment/asgi/
"""
import os
from django.core.asgi import get_asgi_application
os.environ.setdefault("DJANGO_SETTINGS_MODULE", "myapp.settings")
application = get_asgi_application()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment