#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 , 7 years ago
Summary: | Lazy Relationships → Clarify the definition of a lazy relationship in the docs |
---|---|
Triage Stage: | Unreviewed → Ready for checkin |
comment:2 by , 7 years ago
Resolution: | → fixed |
---|---|
Status: | new → closed |
In 50a97edc: