There are cooler frameworks, there are more minimal frameworks, there are more "modern" frameworks. Whatever that means. Yes I would like to work with FastAPI, it is great. But...<p>Django gets the shit done. There are plenty of developers to find for it. Lots of good quality plugins. Every problem you have, infrastructure wise, is often already solved and there is a blog post of it.<p>Its good parts and its bad parts are widely written about. And if that is not enough: the documentation is great.<p>Great framework to get your product to market, it allows me to focus on building products. I dont want to think about routing forms processing, or project layout again. I want to write code for the product, not for the framework. Django is just good enough. Forms, URL routing and models are not what delivers value to products I am working on. So I don't want to spend time on it.<p>Remember: no customer cares about your product being run on cool-async-framework-X. Customers just want a good looking and good working product.
I love Django and have been using it for many many years. Lately, however, I’ve been finding it increasingly difficult not to be annoyed by some aspects of the developer experience. For example I’d choose React + Typescript over Django templates any time of the day.
If anyone's looking something close to FastAPI but for Django, checkout django-ninja [1][2]. I recently joined a team that uses it, and it's pretty nice so far.<p>[1] <a href="https://django-ninja.rest-framework.com/" rel="nofollow">https://django-ninja.rest-framework.com/</a><p>[2] <a href="https://github.com/vitalik/django-ninja" rel="nofollow">https://github.com/vitalik/django-ninja</a>
Great to see this project moving forward with new features and support for other backends etc. Every now and then I try out other frameworks but come back to Django for many of my projects.
Here’s my post summarizing new testing features in Django 4.0: <a href="https://adamj.eu/tech/2021/09/28/new-testing-features-in-django-4.0/" rel="nofollow">https://adamj.eu/tech/2021/09/28/new-testing-features-in-dja...</a>
Love Django. But we are using Django with Gunicorn at work and we are having massive concurrency issues (1 process, gthread)... More than 4 concurrent requests waiting on a slow IO and the whole thing melts down...<p>FastAPI doesn't have those issues at all...
One thing I've never been able to figure out with Django is how to properly handle javascript. How do you all handle stuff like js dependencies? What I do now is just copy and paste a dependency like mapboxjs and keep it in the static folder. Would be great if I could use node or something like that and then have a way to import js dependencies in django templates. I've been using htmx and alpine js to sprinkle some js into my templates, but maintaining all of those js files always feel so clunky
My favorite new additions:<p>- django.core.cache.backends.redis.RedisCache cache backend provides built-in support for caching with Redis<p>- The runserver management command now supports the --skip-checks option.<p>- The shell command now respects sys.__interactivehook__ at startup. This allows loading shell history between interactive sessions. As a consequence, readline is no longer loaded if running in isolated mode.<p>- New QuerySet.contains(obj) method returns whether the queryset contains the given object. This tries to perform the query in the simplest and fastest way possible.<p>- Lookup expressions may now be used in QuerySet annotations, aggregations, and directly in filters.
As someone who mostly has worked with minimal web frameworks (no ORM, admin site, etc), Django seems appealing. My only concern is that the ORM seems to be pretty coupled with different pieces of the framework, and I'd prefer to write SQL and wrapper it on a function on the model. Is my observation on the coupling off? Does anyone here have a good bit of experience using the raw SQL option for queries most of the time? I've seen people do it once and a while in situations they needed it, but no one who uses it as heavily as I'd plan to use it.
Upgraded one of my non-trivial Django projects to 4.0rc1 and so far it seems like I had to change zero lines.<p>Pretty good for a new major version release, that's what I call mature software!
Is the line "abundance of new features" a joke?<p>This a a major version increase, looks like very minor new features as usual.<p>What happended to the async ORM?
Last week I was trying develop a quick prototype, and instead of setting up a C# project, I tried Django.<p>At first, everything seemed super easy, but later I hit so many road-blocks that I had to give up (For example defining a self-referential m2m relationship with a custom join table, and getting it working on the admin site).<p>Don't people really have such problems with it? It really feels like a huge burden when you do things outside the happy-path. Also the documentation is indeed superb but you also hit a lot of outdated info when searching the web.
Django is good for those who have used it a lot.<p>For beginners, there are much better alternatives and, frankly, Django way of development is severely restricting.<p>Starting off with an API backend and a React/Angular/Vue front end, allows new developers to learn better abstractions (and not merge front ends and back-ends)<p>The very idea of "sending UI code to the front end for every request" is unsuitable for medium to large projects. But, if you start building smaller projects with an vertically integrated system like Django, it becomes increasingly difficult to think about larger projects.