From addae17b13d9e3bdc19335d130c81d8a0f98cc31 Mon Sep 17 00:00:00 2001 From: josnin Date: Thu, 29 Apr 2021 17:47:23 +0800 Subject: [PATCH] django channels upgrade from 2 to 3 (#11) * django channels upgrade from 2 to 3 * channel-redis also required to upgrade from 3.1 -> 3.2 --- chat/routing.py | 2 +- requirements | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/chat/routing.py b/chat/routing.py index 90bf611..fd9e7f3 100644 --- a/chat/routing.py +++ b/chat/routing.py @@ -3,5 +3,5 @@ from . import consumers websocket_urlpatterns = [ - re_path(r'ws/chat/(?P\w+)/$', consumers.ChatConsumer), + re_path(r'ws/chat/(?P\w+)/$', consumers.ChatConsumer.as_asgi()), ] diff --git a/requirements b/requirements index 508bae9..e895822 100644 --- a/requirements +++ b/requirements @@ -6,11 +6,11 @@ attrs==20.2.0 autobahn==20.7.1 Automat==20.2.0 cffi==1.14.2 -channels==2.4.0 -channels-redis==3.1.0 +channels==3.0.3 +channels-redis==3.2.0 constantly==15.1.0 cryptography==3.1 -daphne==2.5.0 +daphne==3.0.2 Django==3.1.1 hiredis==1.1.0 hyperlink==20.0.1