Just finished up a quick one day project… Was curious about Torando and since I’ve been playing with Django wondered about mixing the two… Of course at one level there isn’t much reason to put django and tornado together since django has a “fine” webserver built in and Torando is all about async.

Thus you need to invent an app that requires async, traditional http chat with long polling is the trick. So, pulling a demo from the NodeJS land and building a bunch of glue work I ended up with a working Django+Torando = Chat application. Sorry there is no demo, since it looks and works pretty much like the NodeJS chat application (borrowed their UI and JS).

However if you want to check out the code take a look at this:

http://github.com/koblas/django-on-tornado

The key part that’s interesting is this ability to add asyn requests to a django handler: