Entries from May 2010 ↓

Easy Django choices done right

In a old, but still relevant post James Bennet argues for a way of handling the choice tuples used by Django. One of the reasons I haven’t always followed that advice was that it was just a lot of extra mundane keystrokes, and I’m lazy. It was well suited for a quick Python hack, and I now use the script below as a TextMate bundle so that I can just type in a list and have it converted to “the right way”.

Continue reading →