switch to channels 2.x

This commit is contained in:
Martin Pépin 2018-05-03 12:34:02 +02:00
parent ce9ee193d8
commit 306ca2bcc8
2 changed files with 6 additions and 2 deletions

View file

@ -1,2 +1,5 @@
from channels.routing import ProtocolTypeRouter
# Nothing yet # Nothing yet
channel_routing = [] application = ProtocolTypeRouter({})

View file

@ -84,6 +84,7 @@ REST_FRAMEWORK = {
} }
ROOT_URLCONF = 'evenementiel.urls' ROOT_URLCONF = 'evenementiel.urls'
ASGI_APPLICATION = "evenementiel.routing.application"
STATIC_URL = "/static/" STATIC_URL = "/static/"
MEDIA_URL = "/media/" MEDIA_URL = "/media/"
@ -123,7 +124,7 @@ DATABASES = {
CHANNEL_LAYERS = { CHANNEL_LAYERS = {
"default": { "default": {
"BACKEND": "asgi_redis.RedisChannelLayer", "BACKEND": "channels_redis.RedisChannelLayer",
"CONFIG": { "CONFIG": {
"hosts": [( "hosts": [(
"redis://:{passwd}@{host}:{port}/{db}" "redis://:{passwd}@{host}:{port}/{db}"