from django.urls import re_path
from . import consumers
websocket_urlpatterns = [
        re_path(r'ws/chat/(?P<room_name>\w+)/$',consumers.ChatConsumer.as_asgi()),]
getting error of as_asgi()
This is because of the version of 'channels'. check the channels version of your channels. It is working with channels 3.0.1. If you had downgraded your channels-redis, channels also will get downgraded.
Use channels==3.0.1 & you are good to go.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With