Django makes it easier to build better web apps more quickly and with less code
djangoproject.com
djangoproject.com
Been using Django for long but I consider its ergonomics to be quiet ugly from class based mixin views to models and forms being two separate things among others.
That is certainly true, both for Django it self and the Django Rest Framework. If you try to fight Django on how you use it, you're going to have a bad time.
One trick I use when working of Django projects is to look at my code and think: Am I writing too much code? If you have a method that more than 15 - 20 lines, you're most likely doing something wrong.
Also it's easy to use Django in a function centric way (see Adam Hill's django-fbv).
I have objectively measured myself in how fast I can build a crud app. Even though I am a Java expert and maybe only a mid-level Python person - I can build sites faster with Django than Spring Boot.
Now having said that there is a certain size project that I feel is Django's sweet spot - 5 devs or less (maybe 10 if you are strong on type hinting and other tooling). Anything bigger and it's Java all the way.
It's like linking to the Ruby on Rails site and saying "Compress the complexity of modern web apps" or linking to Google.com and saying "A search engine to help you find things!"
Huh?
Yes.
I’ve really wanted to pivot towards python mostly because it’s so transferable to software applications outside web (scientific computing being the main “niche” here) but don’t really see it happening. Anyone willing to try and convince otherwise? Also curious on the tradeoffs between django and flask from someone who has some experience with both
Django comes with batteries included which is perfect for a large set of problems like Appointment booking SaaS or similar client-server problems. It is opinionated in certain areas like ORM or MVT but gives enough leeway in others like addons like DRF and templating. It does strict MVT which makes it unfashionable in µservices and DDD contexts. But once you make peace with the ecosystem and choices, the absolute speed you get in terms or releasing features is phenomenal.
Apart from inbuilt support for security, templating, documentation, Django also plays really well with 3rd party tools like heavyweight frontend frameworks (React) or lightweight libs (HTMX+AlpineJS). It's ecosystem is also great and you can easily setup Social auth or custom crispy forms in a day or so. And the cherry on top if Django admin which is highly customizable and unbeatable.
That's me.
TLDR:
Context is E-commerce apps. Best experience is Django. By large.
For anything that looks like a content management system, use Django. That's literally what it's for, and it's unmatched in this space.
If you want to make a backend for your react/vue/svelte frontend, maybe look at Fastapi. Or better yet, use Go.
But Flask... it's a no-go for me in all use cases. Too much fiddling.
Note how they have mis-appropriated the usual meaning of the word "fast" as it relates to software. "Fast" in a software context means fast for the user, at runtime. Here they are referring to the development speed.