Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

[1.7.x] Fixed minor syntax error in Queryset docs

Backport of f2eea96 from master.
  • Loading branch information...
commit cc8a800d0c7c9335f74d1b9e4ae16bc44e8f85a9 1 parent dda6224
@bryanhelmig bryanhelmig authored bmispelon committed
Showing with 1 addition and 1 deletion.
  1. +1 −1  docs/ref/models/querysets.txt
View
2  docs/ref/models/querysets.txt
@@ -981,7 +981,7 @@ less ambiguous than storing a filtered result in the related manager's cache:
>>>
>>> # Recommended:
>>> restaurants = Restaurant.objects.prefetch_related(
- ... Prefetch('pizzas', to_attr='vegetarian_pizzas' queryset=queryset))
+ ... Prefetch('pizzas', queryset=queryset, to_attr='vegetarian_pizzas'))
>>> vegetarian_pizzas = restaurants[0].vegetarian_pizzas
>>>
>>> # Not recommended:
Please sign in to comment.
Something went wrong with that request. Please try again.