Comments (6)
Out of scope for Daphne.
from daphne.
This is sabotage!!11
from daphne.
@pwtail don't use such aggressive language. You won't make many internet friends like that.
Daphne has a clear scope - it's an ASGI server. Adding WSGI support would be a lot of coding and maintenance, for little gain, since there are great WSGI servers out there.
from daphne.
Sorry, I was trying to make a joke)
However, I think, django sees running a single ASGI server as a sound option. As opposed to running both WSGI and ASGI and routing between them.
As I understand, when run under ASGI, a view taking a WSGIRequest, will be auto-adapted, and an ASGIRequest will be passed to it, thus breaking its code. Am I missing something?
from daphne.
As I understand, when run under ASGI, a view taking a WSGIRequest, will be auto-adapted, and an ASGIRequest will be passed to it, thus breaking its code.
"breaking its code" would depend on that code assuming it's passed a WSGIRequest
rather than an HttpRequest
(the base class). The latter is all that Django promises. I'm not sure there are many noticeable differences in WSGIRequest
anyway? Have you got an example of a crash?
from daphne.
Thank you @adamchainz for your questions, I've been able to figure that out. django has all the logic in place for this, it just doesn't "export" the API. It is relatively easy to make this functionality public as a some kind of ASGI-to-WSGI adapter, just nobody seems to be interested in that.
In other words, django contains the code equivalent to this package for example https://github.com/etianen/aiohttp-wsgi. It just keeps it private
from daphne.
Related Issues (20)
- Move runserver command into Daphne. HOT 1
- can't access via LAN HOT 1
- runworker does not adhere to logging configuration from settings.py HOT 2
- Twisted exception when TLS is used with Daphne on Windows 10 HOT 11
- 3.0.2 Failing Safety Check - No Stable Upgrade Available HOT 3
- Django running behind multiple Daphne instances opens too many database connections HOT 11
- Error setting up SSL - CRITICAL Listen failure: Couldn't listen on any:8000: [Errno 98] Address already in use. HOT 1
- Response 400 when submit a 3-Images Form by POST HOT 2
- Missing support for --nostatic and --insecure options in Daphne's runserver command HOT 2
- how to set websocket send buffersize in daphne
- issuse when i using daphe in my django app with streaminghttpresponse HOT 7
- Does daphne have a file for initialization?
- Requests with Transfer-Encoding: chunked have no content HOT 15
- StreamHttpResponse with sync operations break in Daphne HOT 5
- Memory usage: Daphne loading all the file in memory (POST request) HOT 7
- Text streaming buffered issue
- Implement WebSocket Denial Response extension HOT 8
- [feature request] trailing headers HOT 1
- Add support for Python 3.12
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from daphne.