Skip to content
Projeler
Gruplar
Parçacıklar
Yardım
Yükleniyor...
Oturum aç / Kaydol
Gezinmeyi değiştir
D
django
Proje
Proje
Ayrıntılar
Etkinlik
Cycle Analytics
Depo (repository)
Depo (repository)
Dosyalar
Kayıtlar (commit)
Dallar (branch)
Etiketler
Katkıda bulunanlar
Grafik
Karşılaştır
Grafikler
Konular (issue)
0
Konular (issue)
0
Liste
Pano
Etiketler
Kilometre Taşları
Birleştirme (merge) Talepleri
0
Birleştirme (merge) Talepleri
0
CI / CD
CI / CD
İş akışları (pipeline)
İşler
Zamanlamalar
Grafikler
Paketler
Paketler
Wiki
Wiki
Parçacıklar
Parçacıklar
Üyeler
Üyeler
Collapse sidebar
Close sidebar
Etkinlik
Grafik
Grafikler
Yeni bir konu (issue) oluştur
İşler
Kayıtlar (commit)
Konu (issue) Panoları
Kenar çubuğunu aç
Batuhan Osman TASKAYA
django
Commits
3e0d7de8
Kaydet (Commit)
3e0d7de8
authored
Kas 12, 2014
tarafından
Tim Graham
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
[1.7.x] Fixed #23774 -- Clarified QuerySet.order_by() and related models.
Backport of
11b7680d
from master
üst
7c44d4be
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
3 deletions
+7
-3
querysets.txt
docs/ref/models/querysets.txt
+7
-3
No files found.
docs/ref/models/querysets.txt
Dosyayı görüntüle @
3e0d7de8
...
...
@@ -282,9 +282,10 @@ and so on for as many models as you want to join. For example::
Entry.objects.order_by('blog__name', 'headline')
If you try to order by a field that is a relation to another model, Django will
use the default ordering on the related model
(
or order by the related model's
use the default ordering on the related model
,
or order by the related model's
primary key if there is no :attr:`Meta.ordering
<django.db.models.Options.ordering>` specified. For example::
<django.db.models.Options.ordering>` specified. For example, since the ``Blog``
model has no default ordering specified::
Entry.objects.order_by('blog')
...
...
@@ -292,7 +293,10 @@ primary key if there is no :attr:`Meta.ordering
Entry.objects.order_by('blog__id')
...since the ``Blog`` model has no default ordering specified.
If ``Blog`` had ``ordering = ['name']``, then the first queryset would be
identical to::
Entry.objects.order_by('blog__name')
.. versionadded:: 1.7
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment