mirror of
https://github.com/django/django.git
synced 2025-08-03 02:23:12 +00:00
Fixed typos of "select_related" in docs and tests.
This commit is contained in:
parent
79f27f2b61
commit
7d363ed432
3 changed files with 5 additions and 5 deletions
|
@ -787,8 +787,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::
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue