18

I think I get why Cloudflare's CTO is asking this question.  personally started using Django for backend development, boy, that thing is robust and cool, esp...

you are viewing a single comment's thread
view the rest of the comments
[-] onlinepersona@programming.dev 1 points 2 days ago

Does Django support async now? I remember that it was supposed to come with Django 4.

[-] phutatorius@lemmy.zip 2 points 1 day ago* (last edited 1 day ago)

Does Django support async now?

Yes it does, to some extent. It's a work in progress. https://docs.djangoproject.com/en/6.0/topics/async/

[-] eager_eagle@lemmy.world 2 points 1 day ago* (last edited 1 day ago)

That's the other part that's a bit problematic. There is some async support, but ORM calls, to my knowledge, are still blocking. There has been some effort put into it, but I'm not sure they'll manage to reimplement it. Other parts of the framework and third party middlewares are blocking too, which makes writing async Django a bit of a minefield.

There needs to be a non negligible amount of work to make sure a given request remains asynchronous across all layers today.

[-] phutatorius@lemmy.zip 1 points 1 day ago

While your point is valid, it's a bit much to fault Django for the deficiencies of third-party middleware.

[-] onlinepersona@programming.dev 1 points 1 day ago

That's a pity.

One of the biggest things I miss about django is its ORM. There is simply nothing better in my opinion. It allows me to think about the application I want to write, not about all the database nonsense and how to join tables, make unions, or aggregate stuff, etc. I have to reevaluate if async is that important to me or not. Every other solution without a similar ORM feels inferior.

[-] phutatorius@lemmy.zip 1 points 1 day ago* (last edited 1 day ago)

There is simply nothing better in my opinion.

Possibly SQLalchemy? But yeah, it's quite good, and there are ways you can bypass the Django ORM and write your own SQL in the cases where it's suboptimal. I've only had to do that a very small number of times during the 20-plus years I've been using Django (I was an early adopter, left Zope like a .38 round leaves a gun).

It also helps that I have some decent SQL optimization skills: when I was doing consulting, I triggered the resignations of two client DBAs because they insisted that there was no way to significantly improve a query's performance, then I did it. Stupid hill to die on, all they had to have done was to have said "OK, let's prototype it and see" instead of getting all dogmatic about it. Ego's a dangerous thing in software development.

[-] onlinepersona@programming.dev 1 points 1 day ago

SQLalchemy is horrible, IMO. You have to read so much of its documentation to get a grip on things. And the backwards compatible changes they made while moving to (I think) SQLAlchemy2 make it terribly difficult to tell apart the API. And type hints were an abomination to deal with when they tried adding them (it's better now).

And don't get me started on migrations with alembic.

I wish the Django ORM could be extracted from Django and used in other projects, but then I also just want to go back to Django.

this post was submitted on 13 Jun 2026
18 points (100.0% liked)

Python

7937 readers
10 users here now

Welcome to the Python community on the programming.dev Lemmy instance!

📅 Events

PastNovember 2023

October 2023

July 2023

August 2023

September 2023

🐍 Python project:
💓 Python Community:
✨ Python Ecosystem:
🌌 Fediverse
Communities
Projects
Feeds

founded 3 years ago
MODERATORS