N
Size: a a a
N
N
KV
N
N
KV
1
1
await channel_layer.send("channel_name", {
"type": "chat.message",
"text": "Hello there!",
})
МП
МП
1
async_to_sync(channel_layer.group_send)("chat", {"type": "chat.force_disconnect"})
МП
МП
МП
МП
1
class ChatConsumer(WebsocketConsumer):
def connect(self):
async_to_sync(self.channel_layer.group_add)("chat", self.channel_name)
Это тут делается?МП