fixup asgi.py for channels2 goodness

This commit is contained in:
Thomas Steen Rasmussen 2018-04-14 17:04:21 +02:00
parent 63c2f68990
commit f50f1fe2e0

View file

@ -1,7 +1,12 @@
"""
ASGI entrypoint. Configures Django and then runs the application
defined in the ASGI_APPLICATION setting.
"""
import os
from channels.asgi import get_channel_layer
import django
from channels.routing import get_default_application
os.environ.setdefault("DJANGO_SETTINGS_MODULE", "bornhack.settings")
channel_layer = get_channel_layer()
django.setup()
application = get_default_application()