All Questions
42
questions
0
votes
0
answers
20
views
Sending a notification to single user using web socket in django
In my drf project, I have added the functionality where notifications are being broadcasted to all web socket users. What I want is to send notification to single user. I hope I will get a solution to ...
0
votes
1
answer
107
views
Django Channels, Set different WebSocket routing patterns for different paths
I am trying to implement a Django Projects with multiple Apps, with multiple Consumers with different WebSocket routing patterns for each paths.
Below is my working code, the code works, but is ...
-1
votes
1
answer
90
views
AssertionError: Expected a `Response`, `HttpResponse` or `StreamingHttpResponse` to be returned from the view, but received a `<class 'coroutine'>`
async def send_stock_updates(symbol):
while True:
stock_info = get_one_stock_info(symbol)
# Send stock info over WebSocket
channel_layer = get_channel_layer()
...
0
votes
0
answers
51
views
django took too long to shut down and was killed
I am using Django Channel for a real-time sending and saving data but when I refresh the page the error came up. I don't know why but, on first load the system is okay but if I reload the page the log ...
0
votes
0
answers
30
views
How to Handle and Send Various File Types (Images, Videos, Audios, PDFs, Documents) in a Django Chat App Using WebSockets and Django REST Framework
I'm working on a chat application where I need to handle and store various types of files such as images, videos, audios, PDFs, and documents using Django and Django REST framework. I have a WebSocket ...
0
votes
0
answers
23
views
How can one enable a mix of authenticated and unauthenticated websockets using Django Channels?
I'm running a Django application with DRF and Channels and I've configured a number of websockets, one of which I need to be open/insecure. However, all I can figure out is how to enable/disable ...
1
vote
1
answer
124
views
Django Rest Framework + Django Channels -> [Errno 111] Connect call failed ('127.0.0.1', 6379)
I am programming a project with Django (4.2.6), Django Rest Framework (3.14.0), Channels (4.0.0) and Channels-Redis(4.2.0), which acts as a backend for a mobile application. So far, I haven't had any ...
0
votes
0
answers
189
views
I am trying to make chat app api using DRF and web socket and i need to understand how run web socket server
I am beginner with web socket. I have a project with accounts app for custom User model which stored in sqlite database and the authentcation method is JWT, and chat app for chat api which data stored ...
0
votes
1
answer
105
views
Need to start AGSI server with django rest framwork
I am beginner with websocket and I need to make chat with Django channels. when i run the command to start ASGI server i got this error
daphne -b 0.0.0.0 -p 8001 project.asgi:application
raise ...
0
votes
0
answers
117
views
How to Integrate WebSocket with Django API Views for Messaging
I am new to Djnago and new to WebSockets so I am a little unsure on the proper integration to use when working with messaging.
I have an API view to send a message to a user which adds that message to ...
-1
votes
1
answer
133
views
How can I make a client server show updated data without send request?
I design a application for a restaurant one of the features is that the user can make an order online and the oreder status is pending until the restaurant cashier or restaurant admin staff convert ...
-1
votes
1
answer
140
views
An exception is being raised when testing websocket with POSTMAN
I am implementing web sockets in my Django Project with channels library. When an object is created, name of that object should be sent to a consumer with group name test_consumer_group_1.
class ...
1
vote
1
answer
161
views
500 error on django channels send message to group
I have the following Django channels consumer but when I try to send data to the stocks group،
it returns a 500 error.
Also, I don't get any error logs.
Here is the consumer:
class ...
0
votes
1
answer
492
views
Websocket connection failed: With django and vue.js
I'm trying to set up websockets to show any new entry in Post model (I'm new with websockets)
class Post(models.Model):
title = models.CharField(max_length=200, unique=True)
content = models....
0
votes
1
answer
393
views
How to connect VUE 3.x frontend websocket to DJANGO 4.x consumer using DJANGOCHANNELSRESTFRAMEWORK?
I have a DJANGO project with the following files.
Basically I am using token authentication in my settings which works well for javascript fetch/axios since I can send the token in the headers. I use ...