[2.1.x] Corrected output of Prefetch.to_attr example.

Backport of ba7a420012 from master.
This commit is contained in:
Sergey Fedoseev 2019-01-31 19:09:08 +05:00 committed by Tim Graham
parent cd21b1a228
commit 86f0779d09
1 changed files with 1 additions and 1 deletions

View File

@ -3449,7 +3449,7 @@ attribute:
>>> prefetch = Prefetch('choice_set', queryset=voted_choices, to_attr='voted_choices')
>>> Question.objects.prefetch_related(prefetch).get().voted_choices
<QuerySet [<Choice: The sky>]>
[<Choice: The sky>]
>>> Question.objects.prefetch_related(prefetch).get().choice_set.all()
<QuerySet [<Choice: Not much>, <Choice: The sky>, <Choice: Just hacking again>]>