From 5822ca6c108e4cde134e55632dbaf79aeead1777 Mon Sep 17 00:00:00 2001 From: Tim Graham Date: Thu, 24 Jul 2014 13:57:00 -0400 Subject: [PATCH] [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 --- docs/ref/models/querysets.txt | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/docs/ref/models/querysets.txt b/docs/ref/models/querysets.txt index 836c5ff5362..93aaaaf8107 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.