Hacker News new | ask | show | jobs
by oooyay 524 days ago
Most of the complaints I've read about Django on HN have to do with ASGI support - which Django added. They're valid but outdated complaints.
2 comments

Also I think most people don't know how much you can scale with gunicorn+gevent before attempting to migrate to ASGI.
ASGI support for Django landed in 2019. Those comments are very outdated

https://docs.djangoproject.com/en/5.1/releases/3.0/#asgi-sup...

tbf it was borderline unusable until they added async DB query support in 4.1 (2022) - before that you had to wrap every DB query with sync_to_async, async_to_sync and it generated too much boilerplate code..., and even in 4.1 the DB queries themselves were still sync/blocking, not truly async because at that point they didn't yet rewrite their database "backends" to use async querying, and I believe that as of now the Django's DB engine still doesn't support natively async DB queries/cursors/transactions/...

Also, lots of the "batteries included" into Django don't have async interfaces yet.., for example the default auth/permission system will get async functions like acreate_user, aauthenticate, ahas_perm only in 5.2 which is expected in April 2025, so as of now these still have to be wrapped in sync_to_async wrappers to work...