Question

When answering this question, I figured out how to properly serve django as a wsgi application, using the twisted wsgi resource.

Is the reverse doable? Can Django serve wsgi applications, and, more specifically, how does one serve twisted as a wsgi application under Django?

Was it helpful?

Solution

Twisted is not a WSGI application; it's an engine for exposing objects to the network. If you imagine a stack of technologies serving your web site, Twisted is squarely below Django in the stack. Asking how to serve Twisted from within Django is a bit like asking how to serve Linux from within Django.

You may, however, be interested in Crochet, which provides an easy-to-use, convenience layer for calling Twisted APIs from within Django code, among other things.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top