Django has been around for 13 years, and I’ve been using it since the beginning. In 2020, is Django still relevant and useful? Let’s take a look.
Introduction to Django
Django is known as “the web framework for perfectionists with deadlines”. It is written in Python and can be considered a “batteries-included” framework. With some other frameworks you have to choose your own ORM, template renderer, caching system, and so on. Django has these all built in so you can get up and running quickly.
However Django is still flexible enough that, if you want to, you can swap out these parts. It is possible to replace Django’s ORM with SQLAlchemy for example. Or you can drop in a different template renderer like Jinja.
If I’m building a super-basic site that needs to render a couple of templates and perhaps collect very little form information, I’d probably use Flask. Anything more advanced than that and I don’t hesitate to start with Django.
Big sites using Django
Whenever a framework or technology is evaluated, the questions that are always asked are “who else is using it?” and “does it scale?”. While the latter probably depends more upon how your app is designed and which caches, databases and “hardware” you’re using, it’s good to be able to point to a number of sites successfully running Django at a large scale.
The Django Project website maintains a list:
And if that list isn’t enough to convince you, I can also reveal to you now that TeraShift.co.nz is also running on Django (shocking, I know!)
Is Django actively maintained?
Even though Django has been around for quite some time, it is still being actively developed. At the time of writing, the latest version is 3.0.8 which was released earlier this month. The latest release candidate for version 3.1 is only a week old.
The latest major version, Django 3, is the beginning of support for Asynchronous Server Gateway Interface or ASGI. This is a replacement for the older Web Server Gateway Interface (WSGI). ASGI uses Python 3’s asyncio to provide non-blocking servers. This is similar to how NodeJS works. While not fully async capable yet, the Django developers are making the move in that direction.
This is the biggest change, but others are listed on the Django 3.0 release page. In short, this shows that Django is still being actively developed and new features are being added.
Third party extensions
Django has a rich library of extensions than can be easily dropped in to enhance an existing project. Here’s some that I’ve found useful.
- Django Configurations: use classes to implement inheritance in your Django settings as well as define them with environment variables.
- Django Crispy Forms: Define your entire form in Python code, instead of having to write
<form>markup and submit buttons in HTML. It also supports a number of CSS frameworks (like Bootstrap and Foundation) and can automatically render forms with the right CSS classes to support these.
- Django Allauth: Easily add the ability to log into your Django site with a Google/FaceBook/Github/Twitter/etc etc account.
There are of course many more third party libraries, and you’re likely to find that someone has made one to fit your needs. These are just three that I find useful across a range of different projects.
When it comes to ease of deployment, PHP is definitely the champion there. Just drop your PHP files onto a server and you’re done.
Deploying Django, or any Python project, is definitely a more difficult process. From virtual machines, to containerisation, to lambdas, at Tera Shift we’ve worked with them all.
But, we’re also working on a way to bridge that gap and make it just as easy to deploy a Python application as it is static HTML. Subscribe to our email list below to be notified of updates to this project.
Python and Django development
We’ve worked with Django for over 13 years, before it was even version 1.0!
Whether you’re building something new or just need maintenance on an existing site, Tera Shift has the experience to make your project a success. Please contact us to find out how we can help.
Django is definitely still relevant in 2020 and continues to make building complex websites quick and simple.