Review: The Definitive Guide to Django

by Marty Alchin on January 16, 2008 about Django

While I normally prefer to write about code, I’d like to take a few minutes and review the recently-published definitive guide on my favorite subject. That’s right, I’m talking about The Definitive Guide to Django: Web Development Done Right by Adrian Holovaty and Jacob Kaplan-Moss (and special quest author Simon Willison).

The process

I can’t really discuss this book without describing the process it went through before it was published. While Adrian and Jacob were writing it, they saw fit to release it to the community for feedback, in hopes of refining its content. Mind you, they already had the crew at Apress helping with the usual copy editing, and Jeremy Dunck making sure the technical stuff was correct, so this wasn’t just a way to get some extra eyes looking over their work. Instead, it was an honest attempt to get suggestions from real people who live and breathe this stuff on a daily basis.

What they got was a flood of comments, ranging from spelling corrections to entire new sections. I was one of the many who got involved and I was very glad to see how eager they were to incorporate ideas from the community. This was actually my first taste of giving back to an open source project, and it certainly gave me the satisfaction I needed to continue doing so.

Having read the book before and after the community editing process, I can confidently say that it was a success. The finished product is considerably more thorough, understandable and applicable than when it first began. This is no slam to the authors, of course; they did a great job, even without our help. But they had the foresight to realize that more people could produce a better product, and they were right.

The book itself

I’ve become fairly adept at Django, so it’s sometimes difficult to imagine how a new user must feel when reading the book. But as soon as I started reading the first chapter, I was brought right back to those first few days I read the Django website. Straight-forward, conversational explanations like those found in this book are a great way to get people get passionate about something. While automated documentation may well convey the necessary raw information to get someone going, it lacks the personality necessary to really get someone excited.

It dives right in with real examples of Django in use, without trying to oversell on features. The authors simply present some code to perform a task, allowing the reader to get a feel for the framework and— if they came from another language, like PHP — for Python itself. Once some basic code is laid out, the book then expounds on what it all means, how it works and how the reader can use it in his or her own applications.

I won’t give a blow-by-blow description of the entire book, but I’ll rather suffice to say that it covers the vast majority of the framework’s features in enough detail to get people going. There’s definitely room for more detail, but I think packing much more information into this particular book would’ve been overkill for its intended audience. It strikes a good balance of information density and readability, always remembering who the readers are.

The missing chapter

Those of us who followed along with the community editing process eagerly awaited two chapters that weren’t released prior to the book: Form Processing and Comments. The Form Processing chapter ended up in the book courtesy of Simon, who did a fantastic job of condensing a fairly complicated topic into a very understandable chapter. However, the Comments chapter never did make it into the book, and while that doesn’t surprise me, I am slightly disappointed.

Comments are a very useful feature that are woefully under-documented so far, and many people were looking forward to an official guide. But there’s been much talk (and some work, I imagine) about rewriting the existing comments framework to make it easier to deal with, and I always got the impression that documentation was on hold until the rewrite was finished. After all, why document something (especially in print) if you don’t really like how it works and plan to rewrite it anyway? Regardless of whether that’s valid logic (or if it was even used), the comments system wasn’t rewritten, and the documentation never made it in. Unfortunate, but not a deal-breaker.

The future

The content of the published book has now worked its way back into the Web site, so readers can once again comment and refine it, possibly even updating it for future Django releases. It looks like the comments system is a bit broken at the moment, but once it’s up and running, I expect it to be a great resource for evolving information about Django as things develop.


This is a great introduction for those new to the framework, even if they’re fairly new to Python as well. Some Python background is required, but just reading through a basic tutorial should suffice. At the same time, though, it’s a great resource even for the experienced Django developer, and deserves a place on your bookshelf if you — or you’d like to — do this stuff for a living.

Also, if you read it and find yourself looking for something a bit more hands-on, keep an eye out for James Bennett‘s Practical Django Projects due out this summer. It promises to approach real-world applications with tried and tested code, so you can get a feel for how a Django application typically comes together.