From 306ca2bcc8cd6be9578feeb82cf855041ca2ed14 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Martin=20P=C3=A9pin?= Date: Thu, 3 May 2018 12:34:02 +0200 Subject: [PATCH] switch to channels 2.x --- evenementiel/routing.py | 5 ++++- evenementiel/settings/common.py | 3 ++- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/evenementiel/routing.py b/evenementiel/routing.py index 8f9af19..7c7945e 100644 --- a/evenementiel/routing.py +++ b/evenementiel/routing.py @@ -1,2 +1,5 @@ +from channels.routing import ProtocolTypeRouter + + # Nothing yet -channel_routing = [] +application = ProtocolTypeRouter({}) diff --git a/evenementiel/settings/common.py b/evenementiel/settings/common.py index 966a57f..e57d499 100644 --- a/evenementiel/settings/common.py +++ b/evenementiel/settings/common.py @@ -84,6 +84,7 @@ REST_FRAMEWORK = { } ROOT_URLCONF = 'evenementiel.urls' +ASGI_APPLICATION = "evenementiel.routing.application" STATIC_URL = "/static/" MEDIA_URL = "/media/" @@ -123,7 +124,7 @@ DATABASES = { CHANNEL_LAYERS = { "default": { - "BACKEND": "asgi_redis.RedisChannelLayer", + "BACKEND": "channels_redis.RedisChannelLayer", "CONFIG": { "hosts": [( "redis://:{passwd}@{host}:{port}/{db}"