Entries published August, 2009

Project Euler and Python

Project Euler is a web site devoted to mathematical problems solved through the use of computer software.

Django aggregation and most popular tags

Use Django to calculate most popular tags, or any query that makes use of an aggregation function.

Add a backslash to URLs automatically

I use Apache's mod_rewrite extensively on my site to generate clean URLs. It is basically matches a regex to a url (similar to Django's URLConf). This snippet will automatically try adding a backslash to any URL that initially generates a 404.

Perform WHOIS Query with PHP

Query WHOIS using PHP.

Django's Inlineformset_factory and You

Yesterday, while trying to set up a public-facing form for a recipes app, I ran into the issue of combining Django's ModelForm (for the Recipe model) with an inline for the foreign key Ingredients. One of my astute coworkers (there are many of them) poi