Questions tagged [django-channels-presence]

9 questions
7
votes
5 answers

Is it possible to list channels stored in a Group?

Is it possible to access the list of channels added in a Group with django-channels? def consumer(message): Group("group_name").add(message.reply_channel) channel_list = Group("group_name").??? EDIT: What I try to achieve is to have access…
vmonteco
  • 14,136
  • 15
  • 55
  • 86
2
votes
1 answer

How to set connection-timeout in django channel?

Django channels disconnect the client if it doesn't respond for few seconds. But I can't find where to set that time limit. i checked this issue. It says it will be configurable.But I can't find where to set that limit. thank you
user14475872
1
vote
1 answer

django-channels: keeping track of users in "rooms"

TL;DR - How do I maintain a list of users in each room so that I can send that data to the front-end to display a list of participants in this room. I'm designing a collaborative web application that uses django-channels for websocket communication…
Areeb
  • 366
  • 1
  • 3
  • 16
0
votes
0 answers

How to connect Django web socket with the third-Party Web Sockets?

I want to connect my Django WebSocket with a third-party web socket. This program is one I wrote, and it functions properly. To avoid having to re-login with the third-party API, I have now added the code to check whether the same room is present in…
0
votes
1 answer

await self.disconnect(message["code"]) TypeError: ChatConsumer.disconnect() takes 1 positional argument but 2 were given

consumers.py import json from channels.generic.websocket import AsyncWebsocketConsumer # from asgiref.sync import sync_to_async class ChatConsumer(AsyncWebsocketConsumer): async def connect(self): self.room_name =…
0
votes
1 answer

Django is becoming synchronous on importing channels

On including the channels in my project (installed_apps), it has become synchronous. I'm using django 3.2.4. if I remove those channels and try, my django server is able to process multiple requests asynchronously(when I'm hitting from postman). Any…
0
votes
0 answers

channels_presence.Presence.user: (fields.E300) Field defines a relation with model 'auth.User', which is either not installed, or is abstract

I am trying to use django channels_presence in my project but my user model is present in another project(microservice architechure) named auth which gives me the error: channels_presence.Presence.user: (fields.E300) Field defines a relation with…
0
votes
0 answers

How to send different message on same group for different users in django channels

I am trying to build a real-time ticket reservation app so I want to display the real time seat booking status to users. For example; I have user1 and user2 connected to a group reservation-1 Now when the user1 selects the ticket in group…
0
votes
1 answer

How to send room name in connect function in Django Channels

I have several rooms in my programs. Each user can connect to these rooms and send messages. for each room, I have a group. I want to specify a room name for these group in connect function. but I don't know how to send room name in connect…
Ali
  • 2,541
  • 2
  • 17
  • 31