Entries published in November 2008

4 entries published in this month. See also: all entries published in 2008, latest entries.

Another take on content negotiation

Today my co-worker Daniel posted a class which performs content negotiation for Django views, allowing you to write a single view which returns any of several types of responses (e.g., HTML, JSON, XML) according to the incoming HTTP Accept header. While it’s certainly cool, he notes a couple of issues with it (including the redundancy it introduces in URL configuration).

So let’s see if we can’t come up with a way to work around this.

Holiday decorations

It seems that the best way to approach this is to avoid the need ...

Entry published November 29, 2008. Read full entry.

Writing custom management commands

The other night in the #django-dev IRC channel, Russ, Eric and I were talking about custom management commands for certain types of common but tedious tasks; Eric was discussing the possibility of a command for automatically generating a tests module in a Django application, since he’s our resident unit-testing freak, and I started toying with the idea of one to generate basic admin declarations for the models in an application.

So I sat down and spent a few minutes writing the code. I haven’t decided yet whether I want to clean ...

Entry published November 14, 2008. Read full entry.

So you want a dynamic form

So I havent really been doing much writing lately. That’s mostly a consequence of the fact that:

  1. Django 1.0 was released, and meeting the schedule for that took up an enormous amount of time.
  2. After that, there was DjangoCon.
  3. Oh, and there are all sorts of things in my life, including a book, a gigantic codebase and dozens of sites, which all need to be updated. Our entire team here in Lawrence has been running short on sleep for a good long while now.

Anyway, I’m going to force myself to break out ...

Entry published November 9, 2008. Read full entry.

What’s next?

What happened today:

Each State shall appoint, in such Manner as the Legislature thereof may direct, a Number of Electors, equal to the whole Number of Senators and Representatives to which the State may be entitled in the Congress: but no Senator or Representative, or Person holding an Office of Trust or Profit under the United States, shall be appointed an Elector.

What happens next:

The Electors shall meet in their respective states, and vote by ballot for President and Vice-President, one of whom, at least, shall not be an inhabitant of the ...

Entry published November 5, 2008. Read full entry.