Adopting the OSQA project has suddenly put learning Django on my list of priorities, so I’m enjoying the holiday weekend and working my way through “The Django Book” by Adrian Holovaty and Jacob Kaplan-Moss. It’s my first significant exposure to Python and its much-loved Django framework, and I have to say that I am pretty impressed. This duo seems to deliver results with very little code and effort – the kind of “smart lazy” I always admire.
The philosophy of Django’s template system, for example, leverages a “keep it simple” approach that encourages better separation of business and presentation logic. Having seen and written too many web templates that actually end up performing business logic, I can appreciate this idea. Similarly, Django’s data model abstraction seems to deliver a good balance between portability and power, and you may never need to write a SQL query to use it.
I’ve been using TextMate on my MacBook Pro to work through the book’s examples so far. I’m pretty sure I’ll end up wanting to use Eclipse or IntelliJ IDEA for OSQA development work. I installed Aptana’s Pydev plugin into Eclipse, but for some reason it fires up python twice and only terminates it once when I invoke their Python debugger, and it’s warning me about errors in code that is apparently correct and works. I also installed the Python Plugin for IntelliJ IDEA, so I’ll give that a try today. It looks pretty solid, and the JetBrains team always does exceptional work.
“The Django Book” is clear, well-organized and moves at a good pace. You’ll want to read the free, online version because the print version is way out of date. I think I’ll put on some Django Reinhardt in the background to set the mood for the next chapter!
{ 8 comments… read them below or add one }
thats great, now after i finish “Dive Into Python”, i will dive into Django
I have been using netbeans for django app development and have found it quite good.
You may also try NetBeans which has nice Python support – http://netbeans.org/features/python/index.html
I’m glad to be reminded that NetBeans offers Python support. I will try that one, too. Thanks!
+1 for Netbeans + Python plugin. Works pretty well with Django.
+10 for Netbeans + Python. Get v6.8. It’s awesome.
Django, check. Python, check. Macbook, check. Textmate, check. Been thinking about trying Netbeans.
And now to the more pressing problem: I’ve googled for over a month now trying to find some place to actually start learning some useful stuff to do with Django. So far, no luck. Lots of blogs and tutorials about trivial things, many people asking the same questions I have, and loads of tutorials that are either outdated, don’t work or don’t do what I want them to do.
I took a quick look at some Django book I found (www.djangobook.org or whatever) – assuming it’s the same one you mentioned – and it really didn’t explain half the things I wanted to find. If someone can recommend something better, I’m all ears.
I need to find some information about how (and why/when) to use separate apps to actually use them as building blocks for my various projects, how I can get them to interact (been through 2-3 different examples, none of them actually work), and most of all – how do I take advantage of the nice widgets already present in the admin site? Why should I write another calendar popup when I know django already has one! I’ve tried dozens of examples, comments, instructions and none of them have actually provided me with a working example – short of actually finding and copying all of the code from some obscure folder deep in the bowels of Django.
I’m still at a point I was a year ago: I do all of my actual production code on PHP because I simply can’t get Django to do even the simple things I want it to do in a way that would actually make any sense to me. I could do it the hard way, but that’s not why I wanted to use Django in the first place.
I did learn and actually complete on production project with Ruby on Rails during this time. It works, it was simple and easy (basically I ported over 2 months’ worth of work on PHP code to RoR in a weekend and it works better than the original), but I never want to touch that steaming pile of turd again. System that breaks the second you update anything on the machine is not production-ready. Nor is something where the syntax changes in a thousand little places with 0.0.1 version upgrade. I haven’t dared to touch the machine after I put it online (after the first disastrous update), and was hoping to port it to Django and get rid of RoR for good, but … oh well. Maybe I should just go back to PHP and know It Just Works.
Just a quick update… At DZone, we have been using JetBrains IntelliJ IDEA Python plugin to maintain our popular OSQA application. The IDEA plugin has worked really well and been a pleasure to use.