Corrected output of Prefetch.to_attr example.

This commit is contained in:
Sergey Fedoseev 2019-01-31 19:09:08 +05:00 committed by Tim Graham
parent b131f9c79f
commit ba7a420012
1 changed files with 1 additions and 1 deletions

View File

@ -3481,7 +3481,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>]>