Moving to Ubuntu for mobile development

My web-development office is a fast-moving place. It averages around 50 miles per hour, and I work on a laptop normally squished between two people on the train to and from the office. When I happen to have a spare moment to build websites at home, I tend to use my desktop, which is running Ubuntu. I do my editing in emacs, where I've gradually got things set up more or less as I like them.

Avoiding database queries with Haystack

Order(n) is a pretty bad idea. Originally, my SearchIndexes for Haystack looked a bit like this: Then, when someone ran a search, and I wanted to display a result, I'd load up a template (which template I loaded depended on grabbing the model name, as recommended in the docs), and any attributes of the model I wanted to display required doing a database lookup to fetch the data, like this: This has a fairly obvious problem - each time you display a search result, you do a database [Read more...]