Opened 3 years ago

Closed 3 years ago

Last modified 3 years ago

#20845 closed Cleanup/optimization (fixed)

prefetch_related() could be explained better

Reported by: Daniele Procida Owned by: Daniele Procida
Component: Documentation Version: master
Severity: Normal Keywords:
Cc: Triage Stage: Accepted
Has patch: yes Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: no UI/UX: no

Description

https://docs.djangoproject.com/en/dev/ref/models/querysets/#prefetch-related

I think I understand what it does now, but it took a lot of work. It's confusing that the most prominent example offered is of something you shouldn't do.

Change History (5)

comment:1 Changed 3 years ago by Daniele Procida

Needs documentation: unset
Needs tests: unset
Owner: changed from nobody to Daniele Procida
Patch needs improvement: unset
Status: newassigned

comment:2 Changed 3 years ago by Tim Graham

Has patch: set
Triage Stage: UnreviewedAccepted
Type: UncategorizedCleanup/optimization
Version: 1.5master

This is addressed in the patch for #20842.

comment:3 Changed 3 years ago by Tim Graham <timograham@…>

Resolution: fixed
Status: assignedclosed

In e8183a8193ebc80fdc6fef789813c2c0c3615e5c:

Fixed #20842 and #20845 - Added a note on order_by() and improved prefetch_related() docs.

comment:4 Changed 3 years ago by Tim Graham <timograham@…>

In 74205c4a3c587a9eedceef1b98cd4b0d529a7510:

[1.6.x] Fixed #20842 and #20845 - Added a note on order_by() and improved prefetch_related() docs.

Backport of e8183a8193 from master

comment:5 Changed 3 years ago by Tim Graham <timograham@…>

In bc33fef90a851da91758fa6c1126456e61aadf35:

[1.5.x] Fixed #20842 and #20845 - Added a note on order_by() and improved prefetch_related() docs.

Backport of e8183a8193 from master

Note: See TracTickets for help on using tickets.
Back to Top