Commit d3404c1c authored by Josh Schneier's avatar Josh Schneier Committed by Tim Graham
Browse files

[1.7.x] Fixed typos of "select_related" in docs.

Backport of 7d363ed4 from master
parent 2401ef86
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -771,8 +771,8 @@ You can use ``select_related()`` with any queryset of objects::
The order of ``filter()`` and ``select_related()`` chaining isn't important.
These querysets are equivalent::

    Entry.objects.filter(pub_date__gt=timezone.now()).selected_related('blog')
    Entry.objects.selected_related('blog').filter(pub_date__gt=timezone.now())
    Entry.objects.filter(pub_date__gt=timezone.now()).select_related('blog')
    Entry.objects.select_related('blog').filter(pub_date__gt=timezone.now())

You can follow foreign keys in a similar way to querying them. If you have the
following models::