[Django] #28466: Lazy Relationships

8 visualizações
Pular para a primeira mensagem não lida

Django

não lida,
3 de ago. de 2017, 21:49:2803/08/2017
para django-...@googlegroups.com
#28466: Lazy Relationships
------------------------------------------------+------------------------
Reporter: Malik A. Rumi | Owner: nobody
Type: Cleanup/optimization | Status: new
Component: Documentation | Version: 1.11
Severity: Normal | Keywords:
Triage Stage: Unreviewed | Has patch: 1
Needs documentation: 0 | Needs tests: 0
Patch needs improvement: 0 | Easy pickings: 1
UI/UX: 1 |
------------------------------------------------+------------------------
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.

--
Ticket URL: <https://code.djangoproject.com/ticket/28466>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.

Django

não lida,
5 de ago. de 2017, 20:58:4805/08/2017
para django-...@googlegroups.com
#28466: Clarify the definition of a lazy relationship in the docs
-------------------------------------+-------------------------------------

Reporter: Malik A. Rumi | Owner: nobody
Type: | Status: new
Cleanup/optimization |
Component: Documentation | Version: 1.11
Severity: Normal | Resolution:
Keywords: | Triage Stage: Ready for
| checkin

Has patch: 1 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 1 | UI/UX: 1
-------------------------------------+-------------------------------------
Changes (by Tim Graham):

* stage: Unreviewed => Ready for checkin


--
Ticket URL: <https://code.djangoproject.com/ticket/28466#comment:1>

Django

não lida,
7 de ago. de 2017, 15:53:5007/08/2017
para django-...@googlegroups.com
#28466: Clarify the definition of a lazy relationship in the docs
-------------------------------------+-------------------------------------
Reporter: Malik A. Rumi | Owner: nobody
Type: | Status: closed
Cleanup/optimization |
Component: Documentation | Version: 1.11
Severity: Normal | Resolution: fixed

Keywords: | Triage Stage: Ready for
| checkin
Has patch: 1 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 1 | UI/UX: 1
-------------------------------------+-------------------------------------
Changes (by Tim Graham <timograham@…>):

* status: new => closed
* resolution: => fixed


Comment:

In [changeset:"50a97edc1a01f3d5325f0be1b91e7c77c3ba7dc0" 50a97edc]:
{{{
#!CommitTicketReference repository=""
revision="50a97edc1a01f3d5325f0be1b91e7c77c3ba7dc0"
Fixed #28466 -- Clarified the definition of a lazy relationship.
}}}

--
Ticket URL: <https://code.djangoproject.com/ticket/28466#comment:2>

Django

não lida,
7 de ago. de 2017, 15:53:5707/08/2017
para django-...@googlegroups.com
#28466: Clarify the definition of a lazy relationship in the docs
-------------------------------------+-------------------------------------
Reporter: Malik A. Rumi | Owner: nobody
Type: | Status: closed
Cleanup/optimization |
Component: Documentation | Version: 1.11

Severity: Normal | Resolution: fixed
Keywords: | Triage Stage: Ready for
| checkin
Has patch: 1 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 1 | UI/UX: 1
-------------------------------------+-------------------------------------

Comment (by Tim Graham <timograham@…>):

In [changeset:"05a828a1aea83f499da15dbaaa98a4ce21f7381b" 05a828a1]:
{{{
#!CommitTicketReference repository=""
revision="05a828a1aea83f499da15dbaaa98a4ce21f7381b"
[1.11.x] Fixed #28466 -- Clarified the definition of a lazy relationship.

Backport of 50a97edc1a01f3d5325f0be1b91e7c77c3ba7dc0 from master
}}}

--
Ticket URL: <https://code.djangoproject.com/ticket/28466#comment:3>

Responder a todos
Responder ao autor
Encaminhar
0 nova mensagem