Opened 3 hours ago
Last modified 3 hours ago
#36657 new Uncategorized
Make advanced ORM functionality more discoverable
Reported by: | Lily | Owned by: | |
---|---|---|---|
Component: | Documentation | Version: | dev |
Severity: | Normal | Keywords: | |
Cc: | Triage Stage: | Unreviewed | |
Has patch: | no | Needs documentation: | no |
Needs tests: | no | Patch needs improvement: | no |
Easy pickings: | no | UI/UX: | no |
Description
At Django on the Med we were discussing how many Django users reach for raw SQL because they don't realise that Django provides tools to allow building their query with the ORM.
I think there are several things we can do to improve the documentation here:
- Add a how-to page explaining how to create custom database functions with
Func
, custom lookups withLookup
and custom transforms withTransform
. - Refactor the lookups reference page (https://docs.djangoproject.com/en/5.2/ref/models/lookups/) to include a list of the builtin lookups or create a new page.
- Add a page listing the builtin transforms.
- Add crosslinks between the how-to page and the reference docs for lists of builtin functions, lookups and transforms.
Note:
See TracTickets
for help on using tickets.
For the how-to page, I was considering using `LastDayOfMonth` as a worked example.