Fixed #23094 -- Removed redundant argument in select_related() example.

Thanks thegeekofalltrades at gmail.com for the report.
This commit is contained in:
Tim Graham 2014-07-24 13:57:00 -04:00
parent 99cd80dc74
commit 5f919b9c81
1 changed files with 2 additions and 3 deletions

View File

@ -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.