|
|
|
|
|
by vlz
879 days ago
|
|
Personally I am fine doing python/Django fullstack without it and never felt the need to use async/await. I was interested in the situation with the Django ORM however. The page you linked to seems somewhat contradictory. In the section on "Queries and the ORM" it seems that there are asynchronous versions for most queries that actually cause an SQL query: https://docs.djangoproject.com/en/5.0/topics/async/#queries-... These should also be fine to be executed in an async context, right? But then later in the section on async safety it somewhat seems like the ORM is totally prevented from being executed in an asynchronous manner: https://docs.djangoproject.com/en/5.0/topics/async/#async-sa... The linked section on orm queries however makes it seem like it should be possible to use the Django ORM asynchronously if you only use the async methods (aget, aupdate, async for, ...) and watch out for some gotchas: https://docs.djangoproject.com/en/5.0/topics/db/queries/#asy... |
|