Skip to content

Commit 00b3166

Browse files
Upgrade dependencies in Django server example
1 parent b068fd6 commit 00b3166

File tree

2 files changed

+23
-9
lines changed

2 files changed

+23
-9
lines changed

examples/server/wsgi/django_socketio/README.md

Lines changed: 14 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,18 @@ You can run it with the Django development web server:
99
python manage.py runserver
1010
```
1111

12-
When running in this mode, you will see a warning indicating that the WebSocket
13-
transport is not available, which is not supported by this web server.
12+
When running in this mode, you will get an error message:
1413

15-
See the documentation for information on supported deployment methods that you
16-
can use to add support for WebSocket.
14+
RuntimeError: Cannot obtain socket from WSGI environment.
15+
16+
This is expected, and it happens because the Django web server does not support
17+
the WebSocket protocol. You can ignore the error, as the server will still work
18+
using long-polling.
19+
20+
To run the application with WebSocket enabled, you can use the Gunicorn web
21+
server as follows:
22+
23+
gunicorn -b :8000 --threads 100 --access-logfile - django_socketio.wsgi:application
24+
25+
See the documentation for information on other supported deployment methods
26+
that you can use to add support for WebSocket.
Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,11 @@
1-
asgiref==3.5.2
1+
asgiref==3.6.0
22
backports.zoneinfo==0.2.1
3-
bidict==0.22.0
4-
Django==4.1.9
5-
python-engineio==4.3.2
6-
python-socketio==5.6.0
3+
bidict==0.22.1
4+
Django==4.2.1
5+
gunicorn==20.1.0
6+
h11==0.14.0
7+
python-engineio==4.4.1
8+
python-socketio==5.8.0
9+
simple-websocket==0.10.0
710
sqlparse==0.4.4
11+
wsproto==1.2.0

0 commit comments

Comments
 (0)