Will Larson writes about deploying Django with Fabric. Fabric is a Capistrano-like tool for remote deployment written in Python.
Big list of Django tips. Note: if your retinas start melting while reading the list try a zap colors bookmarklet.
An example on how cool and extensible Django is - add a completely new relational model field type in 80 lines of code:
My DenormField simply listens to a trio of the relevant signals, and then updates this value whenever it detects that the related User object has been updated, so it only costs on write (which, let's face it, is much better than on every read).
It is very common on busy databases to have part of a relation instanced (here is being called denormalized) in the same row that references it, in order to skip a JOIN on every single read. This extension provides a new model field type for the Django ORM that does all the required work for you. A single line of code in your model will allow it to automatically update the denormalized fields even when they are changed in the foreign row.
WebAlchemy is a very fast static cache for Django:
With WebAlchemy only pages involved in form processing are served directly by Django, the rest of the pages most of the time are served directly by Apache as static content with static content speed.
Basically it stores the request result in a static file and then creates an Apache .htaccess file to include a mod_rewrite rule with precedence over the dynamic mod_python call. In a recent post the author compares it with StaticGenerator, another, much simpler static cache with a similar static behavior but a different approach for marking and selecting cached requests.
The main problem with both of them is that only the response body is cached. Headers, and most importantly, the Content-Type header, are not preserved. It is Apache or the frontend server who decides what is the Content-Type for cached requests, by looking at the extension of the file and matching it to its configured MIME type database, and by properly configuring the valid index file name. For example StaticGenerator just names every cached request as index.html.
I've been recently looking into Django, and I just discovered you can run it on the Google App Engine!
Google App Engine and Django both have the ability to use the WSGI standard to run applications. As a result, it is possible to use nearly the entire Django stack on Google App Engine, including middleware.
This looks like the perfect excuse to learn more about both technologies.
