#36771 closed Cleanup/optimization (invalid)
Django needs a _massive_ refactor
| Reported by: | cammil | Owned by: | |
|---|---|---|---|
| Component: | Uncategorized | Version: | 6.0 |
| Severity: | Normal | Keywords: | refactor |
| Cc: | Triage Stage: | Unreviewed | |
| Has patch: | no | Needs documentation: | no |
| Needs tests: | no | Patch needs improvement: | no |
| Easy pickings: | no | UI/UX: | no |
Description
Django is great. It seems to have nearly everything I want from a web framework. However, I think it needs a massive upgrade
It seems bloated to me, and very difficult to use. FastApi is great and for good reason. It's new, clean, fast, easier to use, has better documentation, suits many of the new use cases (AI?) better than Django. However, it seems to me that Django can and should compete. The issue is that the code base is complex, and the many aspects of Django cannot easily be decoupled. Can you run Django without an ORM? I don't think so. I have been using Django for maybe 15 years, and I still am confused by how the whole framework works.
The admin configuration is very difficult beyond simple modifications that fit. The templating system code is really hard to understand. I suspect there are many other structural issues I am not aware of.
The teams I have worked with are all itching to get off Django and move to FastApi, and the only reason they have not is that it would be a big effort to do so.
Given the many features and benefits of Django, I think it would be a shame to see all this all lost to a cleaner and faster framework. By they way, I am not at all suggesting that "we" need to out-do FastApi. I am suggesting that we can and must drastically improve Django for the benefit of all that use it, and ideally avoid them having to spend considerable effort replatforming to a different framework.
Assuming anyone agrees that 1) this is actually a problem we would like to solve and 2) that a fundamental clean up of the code base is a good idea, then, I think it would be great to get together and discuss what we would want from a big refactor.
Change History (3)
comment:1 by , 45 minutes ago
| Resolution: | → invalid |
|---|---|
| Status: | new → closed |
comment:2 by , 41 minutes ago
Ok. Where would one start a discussion like this then?
I would argue that this is not impossible to action. It _is_ hard, but unless we take concerns like this seriously, then Django, though improving slowly will gradually fail to meet the needs of its users.
comment:3 by , 37 minutes ago
Where would one start a discussion like this then?
What discussion are you trying to have? You can't just "upgrade everything". If there's an area or feature you think could be improved, suggest it. There are lots of open issues in the new-features repo from people with similar concerns to you, but with a narrower scope and a more concrete plan. That's what's needed.
Alternatively, if there are already open discussions there you have opinions on, contribute to the existing discussions there.
As you can imagine, a ticket like this is incredibly hard (basically impossible) to action. If you have any concrete suggestions other than rewrite all of Django from scratch, the new-features repo https://github.com/django/new-features is the best way to go.
A project the size and scale of Django needs to move slowly so it doesn't harm its users. But as can be seen by the new features in each release, it _is_ improving, adapting, changing and "upgrading" - hopefully for the better.