Re: What should I do if I want to send `self.channel_layer.group_send` immediately?

2024-01-15 Thread Kazuki Nagayama
is: > > self.send(text_data=json.dumps({"type": "chat_message", "message": > "first_chatMessage"})) > > On Mon, 15 Jan 2024, 6:57 am Kazuki Nagayama, > wrote: > >> >> That's exactly what! >> Do you know where this

Re: What should I do if I want to send `self.channel_layer.group_send` immediately?

2024-01-14 Thread Kazuki Nagayama
January 12, 2024 12:19:45 AM CST, Kazuki Nagayama < > k_nag...@dynaxt.co.jp> wrote: > >> django = 5..0.1 >> channels = 4.0.1 >> >> I have code like below. >> >> ```python >> class ChatConsumer(AsyncWebsocketConsumer): >>

What should I do if I want to send `self.channel_layer.group_send` immediately?

2024-01-11 Thread Kazuki Nagayama
django = 5..0.1 channels = 4.0.1 I have code like below. ```python class ChatConsumer(AsyncWebsocketConsumer): async def receive(self, text_data): await self.channel_layer.group_send( roomId, {"type": "chat_message", "message": "first_chatMessage"}

Re: Is async class-based view available?

2021-06-09 Thread kazuki
I know this However, I don't know how to use it. How can I use this to create an asynchronous AsyncListView or AsyncTemplateView? 2021年6月9日水曜日 13:28:16 UTC+9 sutharl...@gmail.com: > https://docs.djangoproject.com/en/3.2/topics/async/ > > On Wed, 9 Jun 2021 at 08:11, kazuki w

Is async class-based view available?

2021-06-08 Thread kazuki
I'm already using a web application that takes advantage of class-based views. And I want to take advantage of the async class-based view. However, I can't find any information when I look it up. Is there a class such as async_view? I want to use TemplateView and ListView asynchronously. -- You