That general story can happen with any tech stack.
POC whipped together without good architecture. Having proven itself, usage increases until the application starts to burst at the seams. Program must be redesigned, avoiding performance gotchas.
I still think Django + the ORM give you a lot of runway before performance should be a concern.
Idk. The python stack strikes as particularly troublesome if you don’t know exactly what you’re doing. There are no guardrails for less experienced devs that prevents you from making basic mistakes.
I also realized mid project that the default rest framework doesn’t support good api model generation from OpenApi or vice versa. And most devs didn’t understand why using untyped dicts everywhere was bad.
In all transparency, I am openly biased for static typing and have a background in java, c# and Swift.
So what we ended up with looked similar to a statically typed language but without the tooling or performance.
Have you tried django-ninja or FastAPI?
No. It was too late to change. We did not have enough test coverage to change the rest framework with full confidence. And the lack of good refactoring support (or static typing) didn't help either.
Guess who had to refactor this mess and steer away from catastrophy.
I’m haunted to this day.