Entries published in September 2006
I don’t really know where I should begin, John. Maybe I could start with your unnecessary brutality over on Jeff’s blog. Maybe I could start with the rather nasty screed you left for me today. There are other things you’ve said that I could dig up and go through, but that’s not really where I should begin.
So let me start with my to-do list. There are about fifty things on it right now; in fact, there are pretty much always about fifty things on my to-do list. Most of my ...
Django tips: laying out an application
Continuing the theme of dealing with common questions from the Django mailing lists and IRC channel, today we’ll look at how to organize the various bits of a Django-based project or application.
Projects versus applications
This is really more of a separate (though related) question, but understanding the distinction Django draws between a “project” and an “application” is a big part of good code layout. Roughly speaking, this is what the two terms mean:
- An application tries to provide a single, relatively self-contained set of related functions. An application is allowed to define ...
Django tips: documentation and resources
Django’s official documentation often draws praise for being well above average for an open-source project, but it’s far from being the only source of useful information for a developer using the framework. Also, articles and tutorials specific to Django aren’t the only useful documentation out there; the Python language in general tends to have tons of great resources. So let’s take a look at some resources you might not know about but should.
Python in general
For someone who’s new to programming in general, or for a programmer who’s new to Python ...
A long time ago, in a land far away, there lived people who were called “carpenters”, and their jobs consisted, in part, of the following tasks:
- Cutting pieces of wood to particular sizes
- Occasionally refining those pieces of wood into particular shapes
- Putting the pieces of wood together, and making them stay together.
Now, the last one was particularly problematic, because it usually involved pounding a small metal connector — called a “nail” — through one of the pieces of wood and into another. Many carpenters working in small shops had to resort to ...
Django tips: user registration
One of the most common and, generally, most successful models for letting people sign up for user accounts requires the user to go through some form of “activation”; usually it looks something like this:
- User fills out a form with a username, password and email address.
- User gets an email with a “confirmation link” which must be clicked to activate the account.
- User clicks the link and the account becomes active; then they log in normally.
So let’s look at how to do this with Django.
Also, before we dive in, let me note that ...
It’s the end of the week and, while I’ve got plenty of things I could write about, I’m sort of tired and burned out. So let’s just look at a couple things that went on this week.
Django performance with foreign keys
There’s been a bit of a to-do the last few days over a supposed performance problem in Django. I have a hard time classifying it as a “bug”, though — the whole thing centers around the fact that, to generate an HTML select box of possible choices for a foreign ...