summaryrefslogtreecommitdiff
path: root/docs/ref
diff options
context:
space:
mode:
authorThomas Orozco <thomas@orozco.fr>2013-11-23 23:48:34 +0100
committerThomas Orozco <thomas@orozco.fr>2013-11-23 23:48:34 +0100
commit957d22b8508c5884defcd19f91f580de679db9ca (patch)
tree290fc4720ded89bac5d5a8a9f0f0072822aeebf3 /docs/ref
parenta739573e178694cf2c4ad77b57fbc7e90c1c5d55 (diff)
Add missing commas in Prefetch docs
Diffstat (limited to 'docs/ref')
-rw-r--r--docs/ref/models/querysets.txt4
1 files changed, 2 insertions, 2 deletions
diff --git a/docs/ref/models/querysets.txt b/docs/ref/models/querysets.txt
index d1b6caba8d..d8f7d35c5a 100644
--- a/docs/ref/models/querysets.txt
+++ b/docs/ref/models/querysets.txt
@@ -956,14 +956,14 @@ This allows prefetching the same relation multiple times with a different
>>> vegetarian_pizzas = Pizza.objects.filter(vegetarian=True)
>>> Restaurant.objects.prefetch_related(
... Prefetch('pizzas', to_attr('menu')),
- ... Prefetch('pizzas', queryset=vegetarian_pizzas to_attr='vegetarian_menu'))
+ ... Prefetch('pizzas', queryset=vegetarian_pizzas, to_attr='vegetarian_menu'))
Lookups created with custom ``to_attr`` can still be traversed as usual by other
lookups:
>>> vegetarian_pizzas = Pizza.objects.filter(vegetarian=True)
>>> Restaurant.objects.prefetch_related(
- ... Prefetch('pizzas', queryset=vegetarian_pizzas to_attr='vegetarian_menu'),
+ ... Prefetch('pizzas', queryset=vegetarian_pizzas, to_attr='vegetarian_menu'),
... 'vegetarian_menu__toppings')
Using ``to_attr`` is recommended when filtering down the prefetch result as it is