Skip to main content

All Questions

29 votes
3 answers
17k views

Send message using Django Channels from outside Consumer class

I am building an online game, which uses Django channels 2.1.5 for websockets. I am able to build the connection between the client and the server, and also able to send data between them only inside ...
Ahmed Hammad's user avatar
  • 3,027
16 votes
3 answers
10k views

Constantly send data to client from server

Take a look at this example. As you can see, some sort of event is constantly being sent to the client. I want to imitate this using Django-Channels, inside consumers.py. Here's a simplified version ...
Eric Kim's user avatar
  • 2,640
12 votes
2 answers
18k views

How to configure Apache to run ASGI in Django Channels? Is Apache even required?

I built a django-project and deployed it to production using Apache-WSGI combo. For that I had added the apache2.conf as shown below: WSGIScriptAlias / /home/ubuntu/MyProject/MyProject/wsgi.py ...
Utkarsh Sinha's user avatar
9 votes
2 answers
12k views

How to use multiple websocket connections using Django Channels?

I have been happily using Django-Channels for several months now. However, I went to add a second websocket dependent application to my Django project and I am running into trouble. The error I am ...
Scott Skiles's user avatar
  • 3,817
7 votes
3 answers
9k views

Django channels file/image upload

I would like to upload files and images using django-channels but i don't have any idea where to start. Seems like there is not much documentation about websockets and file/image uploads. Any ideas?
cwirz's user avatar
  • 424
4 votes
1 answer
4k views

Websocket using Django Channels

I am trying to use Django channels to establish a websocket connection with the browser. The websocket fails to connect with the server: [2017/01/23 23:51:50] HTTP GET / 200 [0.03, 127.0.0.1:60445] [...
Shubham's user avatar
  • 3,143
2 votes
1 answer
1k views

Reusing an existing websocket in Django Channels

I'm messing around semi-seriously with Python to create a sort of a gatekeeper server between a restricted-access system and a GAE application. I'm going to start with a more general question, before ...
Zalán Meggyesi's user avatar
1 vote
1 answer
545 views

Django channels - Client receives message sometimes and not other times till it doesn't recieve it at all

UPDATE I think the issue is with python version. On my localhost it worked fine when I had python 3.6. On production, where the issue appeared first, I have 3.8. After I changed my localhost python ...
Newbie's user avatar
  • 373
1 vote
1 answer
782 views

Websocket Disconnected Connect Call Failed

I am following a turtorial Django Channel 2, I followed all steps and i am having a failed connection in console. I noticed this problem occur when i add Channel_layer to settings, when i remove ...
MrHize's user avatar
  • 220
1 vote
1 answer
176 views

Websocket with Django Channels and IIS - No route found for path

I'm trying to deploy my Django application to my IIS server, but my websocket doesn't work when accessing via IIS, only locally. What did I miss? When I access via IIS: new WebSocket('ws://server:8000/...
Gustavo Lisi's user avatar
1 vote
0 answers
442 views

Django Channels: group_send() getting delayed while sending to active window when a user has multiple windows open

Background: I'm working on a chat application on my local (development) server. Python 3.9.5, Django 3.2, Channels 3.0.3. Each user can see an "all messages" section on the page, containing ...
oktested's user avatar
-1 votes
2 answers
276 views

web socket url with domain name of backend container but doesnot resolve into ip of backend container

i made a docker container for react app and another for django app . now when i make a websocket call const socket = new WebSocket( // `ws://${WEB_SOCKET}:${WEB_SOCKET_PORT}/ws/lobby/`//this ...
komal sai's user avatar
19 votes
3 answers
11k views

Session authentication with Django channels

Trying to get authentication working with Django channels with a very simple websockets app that echoes back whatever the user sends over with a prefix "You said: ". My processes: web: gunicorn ...
lollercoaster's user avatar
15 votes
0 answers
772 views

Django channels with Spring Boot Websockets (StompSession) do not work

Hey there we want to use Django just to execute python code and use channels for the results. Implemented everything the websockets are not working as they should. If I try to send something from our ...
CptDayDreamer's user avatar
11 votes
0 answers
1k views

websocket-client: socket.error: [Errno 104] Connection reset by peer

I am using Django channels to build an realtime chat application. I have installed websocket-client and when I try to connect using ws.connect(), it throws error 104. connection reset by peer. It ...
Streetway Fun's user avatar

15 30 50 per page