Changeset 2689
- Timestamp:
- 04/12/06 20:45:15 (3 years ago)
- Files:
-
- django/trunk/docs/model-api.txt (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
django/trunk/docs/model-api.txt
r2550 r2689 794 794 leading "-" will be ordered ascending. Use the string "?" to order randomly. 795 795 796 See `Specifying ordering`_ for a full example. 796 For example, to order by a ``pub_date`` field ascending, use this:: 797 798 ordering = ['pub_date'] 799 800 To order by ``pub_date`` descending, use this:: 801 802 ordering = ['-pub_date'] 803 804 To order by ``pub_date`` descending, then by ``author`` ascending, use this:: 805 806 ordering = ['-pub_date', 'author'] 807 808 See `Specifying ordering`_ for more examples. 797 809 798 810 .. _Specifying ordering: http://www.djangoproject.com/documentation/models/ordering/
