1
0
mirror of https://github.com/django/django.git synced 2024-12-24 18:16:19 +00:00

Fixed minor syntax error in Queryset docs

This commit is contained in:
Bryan Helmig 2014-03-20 23:30:10 -07:00 committed by Baptiste Mispelon
parent 222262ca23
commit f2eea960e0

View File

@ -981,7 +981,7 @@ less ambiguous than storing a filtered result in the related manager's cache:
>>> >>>
>>> # Recommended: >>> # Recommended:
>>> restaurants = Restaurant.objects.prefetch_related( >>> 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 >>> vegetarian_pizzas = restaurants[0].vegetarian_pizzas
>>> >>>
>>> # Not recommended: >>> # Not recommended: