Look at all your different colored hats! May 28, 2010 10:54 / 0 comments

This post will be very brief, but I want to show a little trick I'm using on my different servers so I can tell them apart at a glance. I use a custom bash prompt which gives the hostname of each server a different color:

[charles@alpha ~] $
[charles@beta ~] $

Generating aggregate data across generic relations May 22, 2010 19:22 / 7 comments

Aggregation support was added to django's ORM in version 1.1, allowing you to generate Sums, Counts, and more without having to write any SQL. According to the docs aggregation is not supported for generic relations. This entry describes how to work around this using the .extra() method.


django-site-gen, a tool for automating site creation May 03, 2010 18:14 / 2 comments

Most django sites I create have quite a lot in common. Beyond the handful of files generated by django-admin startproject, my projects all have a database, wsgi file, apache and nginx confs, static media and templates. All these building blocks of a site vary very little from project-to-project. django-site-gen allows you to automate the creation of the stuff that doesn't vary.


Idea for a simple task queue May 01, 2010 12:45 / 1 comments

cue is a simple queue abstraction along the lines of the command pattern, and provides django apps with a way to decouple the creation of a request from its execution.