Corrected output of Prefetch.to_attr example.
This commit is contained in:
parent
b131f9c79f
commit
ba7a420012
|
@ -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>]>
|
||||
|
||||
|
|
Loading…
Reference in New Issue