Django template filter to implement http://xkcd.com/1288/