Is it time to go back to Django?
July 21, 2026
In the past years, Django lost quite some of its popularity. One reason for that is the rapid rise of FastAPI in API development. I've worked with both, and I must say: "They are both great products." As usual, they both have their pros and cons. In this article, we'll take a look at why I'd encourage everyone to think about using Django again.
Rise of APIs
Nowadays, everything is an API. ML models are exposed via APIs; the backend consumed by your iOS or React web app is an API too. And that's where FastAPI shines. It's fast, simple to use, and comes with built-in Pydantic support for effective payload validation. There's almost no gap between "I want to expose that to others as an API" and having a production-ready API built with FastAPI. On the other hand, it requires many decisions to build more than that:
- Which ORM to use?
- What to use for authentication?
- Which library to use for database migrations?
- How to structure the code?
So while it makes API development seamless, it also requires many more opinions from the engineers.
Become a better engineer, one article at a time.
Practices, mindsets, and habits that actually move the needle. Delivered weekly to your inbox.
Rise of AI
In the last year, AI has taken over the software engineering world. It's everywhere. AI models are really powerful. Consequently, more and more code is written by them. One of the things that helps you produce valuable results with AI agents is to limit the number of decisions the model has to make. Every decision is a point where a wrong assumption can be made. The more such points, the more likely it is that the model ends up with a result very far from where one would initially expect.
How does Django fit into that?
One thing that I often hear about Django is that it's too opinionated. That you need to fight with it if you want to do things in a different way. That's actually a good thing when building with AI. There are "Django ways" to do certain things. This means fewer decisions are required to build the working product. Authentication is there, ORM is there, database migrations are there, and testing tools are there. To just name a few things. You don't need to worry about the AI agent picking up some weird ORM, or implementing authentication in an unsafe way. You just enable it, or follow the official guide.
Conclusion
As we've seen, things that might be a weakness at some point might become a strength again. I'm not saying everyone should switch to Django now - there are still completely valid reasons for not using it. Anyhow, I think that in many cases it can simplify your life when developing with agents. Especially when you're not 100% sure which libraries to use for all the different aspects of the app. With Django, you can simply start the AI agent session and wait for the result. In other words, Django's opinionatedness might actually be a feature in the AI era.