Added a QuerySet.ordered property to check if a queryset is already ordered. Refs #10163.

git-svn-id: http://code.djangoproject.com/svn/django/trunk@10623 bcc190cf-cafb-0310-a4f2-bffc1f526a37
This commit is contained in:
Jacob Kaplan-Moss 2009-04-22 22:16:19 +00:00
parent d463580c1b
commit c00e8d2064
3 changed files with 50 additions and 0 deletions

View file

@ -268,6 +268,12 @@ There's no way to specify whether ordering should be case sensitive. With
respect to case-sensitivity, Django will order results however your database
backend normally orders them.
.. versionadded:: 1.1
You can tell if a query is ordered or not by checking the
:attr:`QuerySet.ordered` attribute, which will be ``True`` if the
``QuerySet`` has been ordered in any way.
``reverse()``
~~~~~~~~~~~~~