Blog Archive for June 12, 2010

Python Closures

June 12, 2010

I wanted to do a regex based search and replace in python, but I wanted something else to be passed into the match function (the current project name), so that I could include it in the replacement text. A quick post on stackoverflow gave me the answer - create a …

Random Select in Django

June 12, 2010

I had a need to pick up a random band from the database, so that I could display a link to its website. I only wanted to do this where the score for the website was to the higher end of our review scale. This can be done in Django …