diff options
| author | Tim Graham <timograham@gmail.com> | 2014-07-24 13:57:00 -0400 |
|---|---|---|
| committer | Tim Graham <timograham@gmail.com> | 2014-07-24 14:10:27 -0400 |
| commit | 5822ca6c108e4cde134e55632dbaf79aeead1777 (patch) | |
| tree | 56b8d3e35900ebc9b8e074d6e9356199ee1d1ddb /docs/ref/models | |
| parent | 0f8e8c86ddcb09c4fb1941d4e1076b0716352828 (diff) | |
[1.7.x] Fixed #23094 -- Removed redundant argument in select_related() example.
Thanks thegeekofalltrades at gmail.com for the report.
Backport of 5f919b9c81 from master
Diffstat (limited to 'docs/ref/models')
| -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 836c5ff536..93aaaaf810 100644 --- a/docs/ref/models/querysets.txt +++ b/docs/ref/models/querysets.txt @@ -766,9 +766,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. |
