Ticket #24462: 24462.diff

File 24462.diff, 664 bytes (added by Tim Graham, 9 years ago)
  • docs/ref/models/querysets.txt

    diff --git a/docs/ref/models/querysets.txt b/docs/ref/models/querysets.txt
    index 05de43f..fdaa795 100644
    a b You can tell if a query is ordered or not by checking the  
    388388:attr:`.QuerySet.ordered` attribute, which will be ``True`` if the
    389389``QuerySet`` has been ordered in any way.
    390390
     391Each ``order_by()`` call will clear any previous ordering. For example, this
     392query will be ordered by ``pub_date`` and not ``headline``::
     393
     394    Entry.objects.order_by('headline').order_by('pub_date')
     395
    391396.. warning::
    392397
    393398    Ordering is not a free operation. Each field you add to the ordering
Back to Top