From f50f1fe2e0031754ccf461f509e173d4d443413a Mon Sep 17 00:00:00 2001 From: Thomas Steen Rasmussen Date: Sat, 14 Apr 2018 17:04:21 +0200 Subject: [PATCH] fixup asgi.py for channels2 goodness --- src/bornhack/asgi.py | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/src/bornhack/asgi.py b/src/bornhack/asgi.py index af900642..80b31c0c 100644 --- a/src/bornhack/asgi.py +++ b/src/bornhack/asgi.py @@ -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()