My Other Sites


Python Web Development with Django: Review

My roommate bought Python Web Development with Django Developer’s Library by Jeff Forcier, Paul Bissex, and Wesley Chun, and I decided to use that as my guide for learning Django. When I looked at the reviews for the book at Amazon, it seemed promising. I didn’t delve deep into them, only looking at the first few comments. So, immediately I began. Of course, I already had Django installed, and if you had been following my blog you’d know of the crap I’ve had to deal with getting FastCGI to work in Windows 7 (I’ve given up for now, but I’ll get back to it one day). In any case, I open the book, and begin working on the first example in the book, the Blog. It seemed simple enough at first, they would give me code, and I would write it up. When they said to run it, I promptly did so. It was a shame that when I followed the example to the letter that it did not work.

So I attempted to fix any problems I was having with the thing. Turned out I had to delete my database and reinstall it as the authors did not mention that syncdb did not fix your database if you make structural changes to your model (which I did, since I had made a mistake). In any case, after that little hiccup, I managed to get the blog application working. Yay for me! It was fairly painless but it didn’t teach me anything about how to actually use Django. That was what the next three chapters were for.

I quickly began to realize that those three chapters simply cover way to much and assume that you know exact what is going on at all times. Now, I’m not an expert Python developer, nor do I claim to be one, and the book doesn’t assume otherwise, but their examples out of context are fairly hard to follow. They do not even teach you how each of the different methods work, only that it is how the framework works. In any case, I decided to skim that part of the book, as I had a feeling that the next four chapters (more examples) would probably be a great deal more help.

They weren’t. I mean, okay, I did each and every one. They all didn’t work right out of the box. Seriously, I had trouble completing each and every single one of them. I don’t even remember the problems I had with each, but needless to say at least one of the problems was various typos. During one of the later examples I actually downloaded the supplemental source code because I had pretty much given up. The source code also did not work, and I had to fix that too. Honestly, I think the authors were in a bit of a rush to release this book, because how can you publish source code that does not work? You can’t prove a book is grammatically correct and that it is spelling error free, but certainly you can make sure code actually compiles and works as expected, especially with the scope of the examples presented.

To be fair, it is a bit of a pain when the authors assume you’re in a Unix environment. For all you Windows people (esp. Windows 7), you’ll just have to learn to adapt and be resilient. For example, the authors did mention symlinks at some point. I didn’t realize I could do symlinks in Windows, so I created an Alias in my configuration file in Apache instead. Not a big deal, but something to keep in mind. Overall I found the book to be alright as far as decent examples to practice with… AFTER you’ve exhausted your online resources. Honestly, I got much more out of this video than any of the examples in the book, simply because it’s a full 20 minutes of following someone create a simple application in Django. If you can get past the Indian voice and the fact that he’s using GRAPHICAL VIM, then you’ll be alright.

Oh, and I also highly recommend the online Django documentation, it is actually quite nice if you know how to use Google.

Tags: , , , ,

Leave a Reply