1
|
This week's theme for tutorial of the day is [Django][1], an open source, high-level Python web framework whose tag line -- The web framework for perfectionists with deadlines -- nicely sums up its goals.
Perhaps the best comparison for Django is Ruby on Rails, which is also a web application framework written, regrettably, in Ruby, whereas Django is, thankfully, written in Python. Django pushes what's known as the DRY principle, "Don't Repeat Yourself." As such most aspects of Django are loosely coupled and extremely easy to reuse.
So what is Django? Is it a CMS? Is it a blogging tool? Is it an early twentieth century jazz guitarist? No. No. And yes, but that's not important right now.
Django is a framework built on Python that you can use to build a Content Management System or a blogging tool, but it is not limited to that. In fact Django reminds me a bit of the character in Airplane who always answers the "what do you make of that?" question literally... *Why, I can make a hat or a brooch or a pterodactyl...*
You'd be hard pressed to find something in the world of web development that Django can't make. In my own work I've made a blogging CMS, a restaurant menu application, an online store and resort rental reservation system using Django.
So where to get started? Why the official Django website of course. There's a nice [overview][2], an [installation guide][3] and a series of "hello world" type [tutorials][4].
Perhaps the most difficult thing about using Django is getting it installed. While you can run Django with Apache 1.3 and FCGI, I don't recommend it for production work. The preferred method is to use Apache 2 with mod_python, but unfortunately not many web hosts offer that setup for "shared accounts."
If you don't want to pony up for a dedicated server, the Django Wiki maintains a list of [Django friendly hosts][5]. If you're looking to set up a local development server it's not too difficult to do on Mac OS X. Antonio Cavedoni has a [nice tutorial][6] to get you started. (Regrettably I don't know of anything similar for Windows users, but perhaps someone can leave some suggestions in the comments).
I should point out that for simple testing purposes Django includes a built in server which you can use to get started.
Later this week I'll post some links to tutorials that help you build more sophisticated applications using Django.
[1]: http://www.djangoproject.com/ "Django | The Web framework for perfectionists with deadlines"
[2]: http://www.djangoproject.com/documentation/overview/ "Django Overview"
[3]: http://www.djangoproject.com/documentation/install/ "Installation Guide"
[4]: http://www.djangoproject.com/documentation/tutorial1/ "Writing your first Django application"
[5]: http://code.djangoproject.com/wiki/DjangoFriendlyWebHosts "Django Friendly Webhosts"
[6]: http://cavedoni.com/2005/django-osx "Installing Django on OS X"
|