If you need to connect slow db queries to websockets, then django isn't the tool at all. If that's the case you can let your slow db queries write the results to something like redis and then connect your websockets to redis instead.
Or you bite the bullet and abandon Django in favor of something purely in tornado that handles async database queries like Momoko.
Comment
Wouldn't django model queries block the tornado ioloop ? This would be very bad for apps with busy db servers ...
Replies
It certainly would. But only if they're slow.
If you need to connect slow db queries to websockets, then django isn't the tool at all. If that's the case you can let your slow db queries write the results to something like redis and then connect your websockets to redis instead.
Or you bite the bullet and abandon Django in favor of something purely in tornado that handles async database queries like Momoko.