Opened 8 months ago

Closed 6 months ago

Last modified 6 months ago

#36095 closed Cleanup/optimization (fixed)

Explicitly introduce lazy references in early sections of the docs before they are used.

Reported by: Clifford Gama Owned by: Clifford Gama
Component: Documentation Version: 5.1
Severity: Normal Keywords:
Cc: Triage Stage: Ready for checkin
Has patch: yes Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: no UI/UX: no

Description

While reading https://docs.djangoproject.com/en/dev/topics/db/models/, I noticed two issues:

  1. Lazy relationships are used in the documentation before they are explicitly introduced https://docs.djangoproject.com/en/dev/topics/db/models/#extra-fields-on-many-to-many-relationships
  2. The ManyToManyField.through option does not document that it supports lazy references.

To address these:

For the first issue, I propose explicitly introducing lazy references in the introductory Models across files section.
For the second issue, I propose adding a note to the ManyToManyField.through section, clarifying that it supports both lazy references and direct model classes.

Change History (9)

comment:1 by Clifford Gama, 8 months ago

Has patch: set

comment:2 by Sarah Boyce, 8 months ago

Triage Stage: UnreviewedAccepted

comment:3 by Sarah Boyce, 6 months ago

Triage Stage: AcceptedReady for checkin

comment:4 by Sarah Boyce <42296566+sarahboyce@…>, 6 months ago

In eb4ea9c:

Refs #36095 -- Doc'd that ManyToManyField.through supports lazy relationships.

comment:5 by Sarah Boyce <42296566+sarahboyce@…>, 6 months ago

Resolution: fixed
Status: assignedclosed

In 6a2c296:

Fixed #36095 -- Introduced lazy references in "Models across files" section.

comment:6 by Sarah Boyce <42296566+sarahboyce@…>, 6 months ago

In 61535d2:

[5.2.x] Refs #36095 -- Doc'd that ManyToManyField.through supports lazy relationships.

Backport of eb4ea9c3efca479b169bed88a5521c4cf47ed2a2 from main.

comment:7 by Sarah Boyce <42296566+sarahboyce@…>, 6 months ago

In 37b8a45:

[5.2.x] Fixed #36095 -- Introduced lazy references in "Models across files" section.

Backport of 6a2c296e706a0b8f9f9b89e66b37001ce2a03ea7 from main.

comment:8 by Sarah Boyce <42296566+sarahboyce@…>, 6 months ago

In bd8bbc8:

[5.1.x] Refs #36095 -- Doc'd that ManyToManyField.through supports lazy relationships.

Backport of eb4ea9c3efca479b169bed88a5521c4cf47ed2a2 from main.

comment:9 by Sarah Boyce <42296566+sarahboyce@…>, 6 months ago

In f927c9f:

[5.1.x] Fixed #36095 -- Introduced lazy references in "Models across files" section.

Backport of 6a2c296e706a0b8f9f9b89e66b37001ce2a03ea7 from main.

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