1
0
mirror of https://github.com/django/django.git synced 2024-12-23 01:25:58 +00:00

Fixed a typo in the documentation

This commit is contained in:
Alex Gaynor 2013-11-26 13:49:46 -06:00
parent 384816fccb
commit bb5ab908cc

View File

@ -955,7 +955,7 @@ 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', to_attr='menu'),
... Prefetch('pizzas', queryset=vegetarian_pizzas, to_attr='vegetarian_menu'))
Lookups created with custom ``to_attr`` can still be traversed as usual by other