WeblateOrg / WeblateOrg/weblate
Utilize Django fetch modes
- Dominant language
- Python
- Stars
- 6.1k
- Forks
- 1.4k
- Avg merge
- 9h 53m
- Merged PRs (30d)
- 395
Description
### Describe the problem
Django 6.1 introduces [fetch modes](https://docs.djangoproject.com/en/6.1/topics/db/fetch-modes/) which are definitely useful to optimize database access.
### Solution brainstorm
* Use `FETCH_RAISE` for existing prefetch-heavy queries that are expected to not fetch additional data on demand to fail.
* Use `FETCH_PEERS` might be a preferable solution to existing wide prefetch invocations for optionally needed data.
### Describe alternatives you have considered
_No response_
### Screenshots
_No response_
### Additional context
* https://docs.djangoproject.com/en/6.1/releases/6.1/
* Can be done once we update the dependency to Django 6.1, what in turn is blocked by several third-party libraries for now.
Contributor guide
Assessment
This issue has not been assessed yet.