It’s actually really easy to make these two things work together. Since ~8.2.0 Twisted has had a WSGI container runnable from the command line. So here is how you run Django on a supported version of Twisted.web.
And there you have it. There are probably a few compatibility problems but this mostly seems to work just fine. I’ll be working with some Django weenies to figure out what, if anything is broken.
- easy_install Twisted
- easy_install Django
- django-admin.py startproject foo
- Create a myapp.py
with the following code:
from django.core.handlers.wsgi import
application = WSGIHandler()
- twistd -no web
So look, this is really AWESOME.
Updated (3/30/2009 4:09pm): Twisted tickets #3585, #3721 are problems on Twisted 8.2.0 but are fixed or should be fixed in Twisted trunk soon.
Updated (3/30/2009 6:34pm): Both of the above tickets are done.