diff options
| author | Tim Graham <timograham@gmail.com> | 2014-07-24 13:57:00 -0400 |
|---|---|---|
| committer | Tim Graham <timograham@gmail.com> | 2014-07-24 13:57:00 -0400 |
| commit | 5f919b9c81a26832f98033335a601ec1ca718db7 (patch) | |
| tree | a05393f9d3cb5d01cf33a96d64d0558864dc130c /docs/ref | |
| parent | 99cd80dc744226f44c492c3580276800eea23c0d (diff) | |
Fixed #23094 -- Removed redundant argument in select_related() example.
Thanks thegeekofalltrades at gmail.com for the report.
Diffstat (limited to 'docs/ref')
| -rw-r--r-- | docs/ref/models/querysets.txt | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/docs/ref/models/querysets.txt b/docs/ref/models/querysets.txt index a2cd2ebed2..96b1b03942 100644 --- a/docs/ref/models/querysets.txt +++ b/docs/ref/models/querysets.txt @@ -762,9 +762,8 @@ following models:: # ... author = models.ForeignKey(Person) -...then a call to ``Book.objects.select_related('person', -'person__city').get(id=4)`` will cache the related ``Person`` *and* the related -``City``:: +... then a call to ``Book.objects.select_related('person__city').get(id=4)`` +will cache the related ``Person`` *and* the related ``City``:: b = Book.objects.select_related('person__city').get(id=4) p = b.author # Doesn't hit the database. |
