Integrate Tornado in Django

Tornado is a nice python WSGI-compliant web server developed by guys at FriendFeed. It’s primarily thought as application server for python web frameworks and according to FriendFeed benchmarks, it’s blazing fast thanks to its non-blocking connections.

UPDATE: For more performance info, James Abley pointed me to a very complete benchmark of available Python asynchronous webservers. It looks like Tornado is a real monster of concurrency.

There are already some how-to’s on the web on plugging Django web framework into Tornado webserver. A quick recap:

  1. A tutorial on Tornado, Django and nginx by Jeremy Bowers.
  2. How to import django framework inside a Tornado project by Lincoln Loop.
  3. A snippet by lawgon.

My approach is slightly different as I wanted to run Tornado using Django management command-line interface.

Read the rest of this entry »

Add to StumbleUpon Add to del.icio.us Add to Mixx!     

.gitignore for Django buildout

If you’re keeping your django buildout installation under git, you may find the following .gitignore list useful to prevent your commits from cluttering with ugly temporary files (of course it also applies to other revision control system ignore files). You may need to adapt folder names to your buildout.cfg setup.

Read the rest of this entry »

Add to StumbleUpon Add to del.icio.us Add to Mixx!     

Buildout!

Of course building from sources packages like wxPython in buildout led me to this:

xkcd buildout

(Remixed by Matt Hamilton, original from http://xkcd.com/303)

Add to StumbleUpon Add to del.icio.us Add to Mixx!     

Install wxPython in buildout

While completing setup of this blog with Wordpress, I’ve also been working on another task: adding wxPython dependency to a pythonic project of mine. The deployment of this project is done through buildout, a nice piece of software that handles a sandboxed environment for python projects.

You can find download and install instructions to start a buildout barebone here, however I will do a small recap:

Read the rest of this entry »

Add to StumbleUpon Add to del.icio.us Add to Mixx!