Skip to content

Instantly share code, notes, and snippets.

@paulwinex
Created July 28, 2018 17:03
Show Gist options
  • Save paulwinex/516ae576cf6e471050cec648c1033e71 to your computer and use it in GitHub Desktop.
Save paulwinex/516ae576cf6e471050cec648c1033e71 to your computer and use it in GitHub Desktop.
"""
ASGI entrypoint. Configures Django and then runs the application
defined in the ASGI_APPLICATION setting.
"""
import os
import django
from channels.routing import get_default_application
os.environ.setdefault("DJANGO_SETTINGS_MODULE", "main.settings")
django.setup()
application = get_default_application()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment