Practical Django Projects Trouble?

I picked up Practical Django Projects by James Bennett just the other day. The book walks through the building of a few different projects, and tries to lead you down the path of “best practices” along the way. However, the book’s publisher decided to release the first edition of this book on the heels of the Django 1.0 release, and the book is specific to pre-1.0 versions of Django.

If you’re kinda new to Django, you’re likely to be lost. I had only done a couple of really simple tutorial projects before picking up this book, and was really unnerved when I hit a seemingly impossible obstacle on page 24 — the dreaded TinyMCE integration. At that point in the book, it starts to become really obvious that this is not a 1.0-compliant Django book.

If you’re having trouble with this book and you’re using Django 1.0, I can give you two tips that are saving my bacon as I work through these bumps:

  1. Go to the porting guide for 1.0, read it, and bookmark it. Better yet, just leave it open in your browser all the time.
  2. For the TinyMCE issue, there’s more than one possible issue — but if your development server is giving you 404s after doing a redirect (302) trying to find the tiny_mce.js file, move the relevant line in the URLConf up. The redirect is a hint that your url didn’t match anything.

The porting guide fixes at least 3 issues in the book by page 40.

Also, if you’re a django n00b looking for help, I started a #django-newbie IRC channel on Come join us!

  • Jonas Beckman

    Brett Haydon has written an excellent ten-part guide to working through the book using Django 1.0. It’s here:

  • Arthur

    You can also checkout the “pre-newforms-admin” tag from Django’s svn, the examples in the book should then work without problems.

  • Toothy

    Releasing a book on django 0.96 is nothing short of pathetic and dishonest.

    The author and publisher should be ashamed of themselves.

  • Martin
  • m0j0

    I really don’t think the author can be held responsible here. Think about this:

    James Bennett is the *release manager* for Django. He’s also the author of the book in question. That means that a) he probably sees every new feature and feature change that comes down the pike, and b) he was probably kinda pissed the the publisher didn’t give him the time to revise his copy.

    I saw in a forum where the author actually began to acknowledge that the book was going to be outdated before it got on the shelves. He didn’t seem pleased about it, but another thing you can’t do is badmouth your publisher in public venues, owing in part to the contractual relationship you have with them.

    As an author of a book myself (for O’Reilly, not Apress), I can say that there are surprises that sometimes pop up, and it’s out of your hands. The timing of the book, and the decision to release the book at all is also out of your hands. As an author, you sign your rights to make these decisions away in the contract. It’s worth noting that writing for magazines and many online outlets is generally a very different story; books are a special case.