Entries published in November 2008
Another take on content negotiation
Published November 29, 2008
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 ...
Writing custom management commands
Published November 14, 2008
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 ...
So you want a dynamic form
Published November 9, 2008
So I havent really been doing much writing lately. That’s mostly a consequence of the fact that:
- Django 1.0 was released, and meeting the schedule for that took up an enormous amount of time.
- After that, there was DjangoCon.
- 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 ...
What’s next?
Published November 5, 2008
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 ...