> Ridiculously fast.
> Django was designed to help developers take applications from concept to completion as quickly as possible.
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.
Django is lovely, but it uses so much Python magic, so much metaclass chicanery, that if you try to use it moderately differently you'll hit roadblocks.
Python needs a better and newer full stack framework.
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.
Compared to the constant bitrot in "newer" frameworks I have grown to like Django more over the years. My old projects in Django still work. The meteor projects, flash apps, Android apps, less so. Modern software undervalues stability.
> that if you try to use it moderately differently you'll hit roadblocks.
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.
Have been through the Django docs tutorial and really like how it has the built in admin panel- a feature I wish rails had. But i work with rails every day and am a lot more familiar with it. Does anyone have a reason to start using Django/python over rails or a node js stack?
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 vs Flask (or FastAPI) is an eternal programmers debate. I've been on this route several time and earlier I chose FastAPI, but now my current project is Django.
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.
If you want a CMS, I'd suggest Wagtail. It's still Django under the hood (and in fact you can use plain Django concepts there) but provides a good set of tooling for CMS-y stuff that you'd otherwise have to build manually.
I’ve done a lot of Django development but these days to build an ordinary web app I either use Starlette with asyncpg and plain SQL or nodejs with plain SQL.
There are definitely a few things I don't like in Django. Extreme OO with generic class based views, I hate mixins of any sort as well. But the organization, functionality and robust 3rd party app ecosystem are where Django shines.
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.
Not to be curmudgeonly, I'm really confused about this post and why it's being upvoted? Django is like 20 years old.
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!"
I think you made your own point. It has been around and maintained for 20 years. The number of web stacks that can claim that are very few. Worth mentioning once in a while.
24 comments
[ 982 ms ] story [ 2324 ms ] threadNote 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.
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.
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.
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.