Contents
Django Girls Installathon at Treehouse headquarters in Portland, Ore., July 17, 2015. (Kenneth Love)
I recently released Treehouse’s first Django course. So, I thought it might be a good idea to talk about why you’d choose Django over other frameworks. Django is my favorite framework for many reasons, some of them concrete, some of them not. In no particular order, here are five of them.
1. Django is time-tested
2015 marks the 10th anniversary of Django’s first open source commit. Django was under development for awhile before it was released, of course. Even if it wasn’t, 10 years is a long time for a project to be around, much less heavily used. Over those 10 years, Django has had several releases. Some of these releases brought new features. Others were focused on preventing new and groundbreaking security issues. In fact, Django is often one of the first frameworks to respond to a new vulnerability. Django’s core team often alerts other frameworks of patches they should make.
This age also adds to the stability of Django. While I can’t say that every wrinkle and bug has been fixed, a lot of them have been. Most Django releases nowadays are focused on new features and edge case concerns. Software might not get wiser with age, but it tends to make better decisions.
2. Django has been crowd-tested
While Rails and Node both get a lot of publicity from their big users, Python and Django tend to be a bit quieter. But that doesn’t mean Django isn’t used by some major hitters!
Django powers many of the Web’s most-used sites, like Pinterest and Instagram. Facebook uses Django for various behind-the-scenes utilities. And Disqus, one of the largest applications on the Internet, is a Django project. Django came from publishing, so it’s no surprise that sites like The Washington Post and Smithsonian Magazine use Django.
3. Tons of Django packages available
Like the Python community in general, the Django community contributes useful packages and utilities for use by the wider world. Searching for “django” on PyPI finds over 3,000 packages available for use. This is on top of Django’s “batteries included” mentality. The framework has already included most things you’re going to want.
Finding your way through all these packages can be tough. We have Django Packages, a community-curated comparison grid of packages for many different uses. We also have the aptly-named awesome-django for a more opinionated list of useful packages.
4. Django has excellent documentation
When it first came out, one of the features that set Django apart was how good the documentation was. Many other frameworks just used an alphabetical list of modules and all the attributes and methods. This is great for quick reference when you just can’t remember if it’s array_sort()
or sort_array()
. It doesn’t help, though, when you’re first learning the framework.
Django’s documentation quality may not be unique any more. It’s definitely still one of the best examples of open source documentation in the wild. And keeping these docs to this quality level is still a concern for Django’s developers. Docs are a first-class citizen in the Django world.
5. The Django community is amazing and supportive
I’ve often talked about how the community is one of the best aspects of the Python world, that may be even more true for the Django world. Django is governed by the DSF, or Django Software Foundation. Every event involving Django has to have a code of conduct. The DSF also recently released a diversity statement making an official stance on the kind of community they want to build.
In a lot of communities, places like IRC and mailing lists are toxic and unwelcoming. These are both pleasant in the Django world, though. Sure, there are occasional bad apples, but they’re handled quickly. And thanks to these policies, groups like Django Girls are able to flourish. In fact, Django Girls has taught Python and Django, along with bits of HTML, CSS, and JavaScript, to over 1600 women. That’s amazing for only having been around for a year!
Django offers stability, tons of packages, good documentation, and a safe and welcoming community. What more could you want? We have lots more Django content coming here at Treehouse but we’d love to hear from you what specific areas you like to learn about. Drop me a line and let me know!