Django-Channels: How to get channel_name from user_id?

前端 未结 0 378
礼貌的吻别
礼貌的吻别 2021-01-01 10:23

Below code prints the channel_name of a client

class ChatConsumer(WebsocketConsumer):
    def connect(self):
        self.room_name = self.scope[\'url_route\'         


        
相关标签:
回答
  • 消灭零回复
提交回复
热议问题