Opened 7 years ago

Closed 7 years ago

Last modified 7 years ago

#28466 closed Cleanup/optimization (fixed)

Clarify the definition of a lazy relationship in the docs

Reported by: Malik A. Rumi Owned by: nobody
Component: Documentation Version: 1.11
Severity: Normal Keywords:
Cc: Triage Stage: Ready for checkin
Has patch: yes Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: yes UI/UX: yes

Description

The language of this page in the docs: https://docs.djangoproject.com/en/dev/ref/models/fields/#lazy-relationships has apparently been unchanged for 8 years, https://github.com/django/django/commit/6c36d4c4f8379433cdce150a64dad6a1f16097cd so maybe I am the only one with this issue, but I draw your attention to the fact that the portion of this page in the docs where the link is anchored says NOTHING about lazy relationships. That term does appear, twice, but much further down, in fact, under two different headings. It is not at all obvious to anyone who doesn't already know what a lazy relationship is, that that is what is being defined when we are told to put quotes around foreign key references. Then, much later, in talking about many to one and one to one, we are told that these are handled like lazy - but when were we ever talking about lazy? We weren't! The only reason I 'got it' was because I found an answer on SO (actually two, to the same question) https://stackoverflow.com/questions/5680414/django-import-error-from-foreign-key-in-another-application-model that explicitly calls this a lazy relationship. How else would anyone know? I don't think they would. I didn't.

Fortunately, I think there is an easy fix. Just change this language from the docs by inserting the bolded text:

This sort of reference, called a lazy relationship, can be useful when resolving circular import dependencies between two applications.

Change History (3)

comment:1 by Tim Graham, 7 years ago

Summary: Lazy RelationshipsClarify the definition of a lazy relationship in the docs
Triage Stage: UnreviewedReady for checkin

comment:2 by Tim Graham <timograham@…>, 7 years ago

Resolution: fixed
Status: newclosed

In 50a97edc:

Fixed #28466 -- Clarified the definition of a lazy relationship.

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

In 05a828a1:

[1.11.x] Fixed #28466 -- Clarified the definition of a lazy relationship.

Backport of 50a97edc1a01f3d5325f0be1b91e7c77c3ba7dc0 from master

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