Skip to content


Subversion checkout URL

You can clone with
Download ZIP
Browse files

Added some examples to 'ordering' section of docs/model-api.txt

git-svn-id: bcc190cf-cafb-0310-a4f2-bffc1f526a37
  • Loading branch information...
1 parent 00b3891 commit 4bcdb15091b21e09a92fe73e26d5ef5cc84bff80 @adrianholovaty adrianholovaty committed
Showing with 13 additions and 1 deletion.
  1. +13 −1 docs/model-api.txt
14 docs/model-api.txt
@@ -793,7 +793,19 @@ Here's a list of all possible ``META`` options. No options are required. Adding
optional "-" prefix, which indicates descending order. Fields without a
leading "-" will be ordered ascending. Use the string "?" to order randomly.
- See `Specifying ordering`_ for a full example.
+ For example, to order by a ``pub_date`` field ascending, use this::
+ ordering = ['pub_date']
+ To order by ``pub_date`` descending, use this::
+ ordering = ['-pub_date']
+ To order by ``pub_date`` descending, then by ``author`` ascending, use this::
+ ordering = ['-pub_date', 'author']
+ See `Specifying ordering`_ for more examples.
.. _Specifying ordering:

0 comments on commit 4bcdb15

Please sign in to comment.
Something went wrong with that request. Please try again.