5 Reasons To Love Django


Django is one of the best web frameworks out there.  Although no project is perfect, any project wanting to best Django has a tough act to follow.  Here’s why:

  1. Django is a full stack.  This means that while it is possible to replace bits and pieces with other bits and pieces, it provides everything you need by default.  Each of the provided pieces is well integrated and works.  For example, the auto-generated admin interface is quite a time saver, and is possible only because the forms, templating, authentication, and ORM systems are all working nicely together.
  2. Django is trivial to extend.  When you are working on a project and you come up with some crazy idea, you can make it real in minutes. Django Middleware allows you to extend how requests are handled.  Want to add an HTTP response header that tells you how long it took Django to process the page? Done.  Middleware also allows you to modify content.  This can be useful for database debugging.  Want to add templating commands?  Template tags to the rescue.  The list goes on and on.
  3. Django is written in Python.  Python is really easy to learn, and regardless of what you hear, the significant whitespace makes code enjoyable to read.  How easy?  I hired someone who had never used Python or Django, and they wrote the Chesspark forum in about a week.  Other benefits of Python abound.  Want a certain view to be locked down?  Python’s decorators will help; just add ‘@login_required’ above the view definintion and you’re done.
  4. Django has a large and helpful community of users. Got some code snippets to share?  Try Django snippets.  Have a question?  Ask on the mailing list or in the chat room.  Look at what those users create at djangosites.  They also love to write about Django in their blogs.
  5. Django documentation is excellent.  It amazes me how good the documentation is.  It’s not just “most open source projects documentation sucks so this is infinitely better” good; it is really good.  Anytime I have some weird question, it’s almost surely mentioned in the documentation along with an example.  Just look at it.  It’s huge.  This documentation puts many commercial projects to shame, and is something that other open source projects should aspire to.  It makes the project accessible to many that probably gave up in frustration using other web frameworks.

If you haven’t looked at Django yet, the overview is a great place to get a feel for it.  I highly encourage you to take a peek and see what you’re missing.

The best part of it all is, Django is not even finished!  The 0.96 version is very stable and in wide use, but those guys have not been resting on their laurels.  The 1.0 version has a tentative date of September 2008, with alpha and beta releases to start in about a month.  A lot of the bits and pieces are getting significantly better.  You don’t even have to wait for them if you are curious since most of them are completed (or nearly so) in the repository.


9 Responses to “5 Reasons To Love Django”

  1. #6: Because it was a ridiculous and great western movie with the best soundtrack ever.

  2. If you ask me (and for the record you didn’t) the version numbers are ridiculous. 0.95, 0.96 and trunk are all so different I could see them as major revision numbers if not entirely separate versions entirely.

    Django’s version numbering and release process confuse many new users. Finally getting to 1.0 will help.

  3. 3 phpimpact

    To be honest, the more I use Rails the more I like Django. Like you said, it provides everything you need by default. Although python doesn’t have great documentation, the language is simple and very powerful. How come the python community is not promoting this framework the same way Ruby developers are doing with Rails?

  4. 4 metajack

    @SuperJared: At least they now have a plan. While it doesn’t do an immediate release, is does do one at the beginning of July, with regularly scheduled releases to follow until September.

    @phpimpact: I suspect the reason for the lack of promotion is that Rails/Ruby people have a dual job of promoting both the framework and the language. In terms of popularity, Ruby is a newcomer (mostly because of Rails). Python was already here and popular. I am glad there is competition, even across languages. It only means those of us who use frameworks will be spoiled for choice and can look forward to many new things.

  5. phpimpact: “How come the python community is not promoting this framework the same way Ruby developers are doing with Rails?”

    Because they have jobs to do. Stuff to ship. Clients to keep happy. Speaking of which…

  6. 6 alrex

    > Django is trivial to extend.

    Perhaps easy to extend but not very flexible.
    Try changing the ORM layer and let me know how that goes.

    I personally believe that WSGI support should be better supported (currently looks like hack) and missing Aggregation support is a big one too. (I have many web apps that require some form of web reports, hence most land up being ugly custom queries.)

    If I had those, I wouldn’t need any more real flexibility that other frameworks may provide.

    Seems that the WSGI (fix) and Aggregation are planed for 1.0 and 1.1 respectively. Looking forward to that.

  7. #34 – Django was like, totally a kickass guitarist.

  1. 1 The Problem With Django « metajack
  2. 2 Hire A Developer, Not An Acronym « metajack

%d bloggers like this: