Browse Source
Upgrade dependencies in Django server example
pull/1194/head
Miguel Grinberg
2 years ago
No known key found for this signature in database
GPG Key ID: 36848B262DF5F06C
2 changed files with
23 additions and
9 deletions
-
examples/server/wsgi/django_socketio/README.md
-
examples/server/wsgi/django_socketio/requirements.txt
|
|
@ -9,8 +9,18 @@ You can run it with the Django development web server: |
|
|
|
python manage.py runserver |
|
|
|
``` |
|
|
|
|
|
|
|
When running in this mode, you will see a warning indicating that the WebSocket |
|
|
|
transport is not available, which is not supported by this web server. |
|
|
|
When running in this mode, you will get an error message: |
|
|
|
|
|
|
|
See the documentation for information on supported deployment methods that you |
|
|
|
can use to add support for WebSocket. |
|
|
|
RuntimeError: Cannot obtain socket from WSGI environment. |
|
|
|
|
|
|
|
This is expected, and it happens because the Django web server does not support |
|
|
|
the WebSocket protocol. You can ignore the error, as the server will still work |
|
|
|
using long-polling. |
|
|
|
|
|
|
|
To run the application with WebSocket enabled, you can use the Gunicorn web |
|
|
|
server as follows: |
|
|
|
|
|
|
|
gunicorn -b :8000 --threads 100 --access-logfile - django_socketio.wsgi:application |
|
|
|
|
|
|
|
See the documentation for information on other supported deployment methods |
|
|
|
that you can use to add support for WebSocket. |
|
|
|
|
|
@ -1,7 +1,11 @@ |
|
|
|
asgiref==3.5.2 |
|
|
|
asgiref==3.6.0 |
|
|
|
backports.zoneinfo==0.2.1 |
|
|
|
bidict==0.22.0 |
|
|
|
Django==4.1.9 |
|
|
|
python-engineio==4.3.2 |
|
|
|
python-socketio==5.6.0 |
|
|
|
bidict==0.22.1 |
|
|
|
Django==4.2.1 |
|
|
|
gunicorn==20.1.0 |
|
|
|
h11==0.14.0 |
|
|
|
python-engineio==4.4.1 |
|
|
|
python-socketio==5.8.0 |
|
|
|
simple-websocket==0.10.0 |
|
|
|
sqlparse==0.4.4 |
|
|
|
wsproto==1.2.0 |
|
|
|