Ticket #17269: r17127-admin-multi-sort-in-options.diff
File r17127-admin-multi-sort-in-options.diff, 869 bytes (added by , 13 years ago) |
---|
-
docs/ref/models/options.txt
189 189 "-" prefix, which indicates descending order. Fields without a leading "-" will 190 190 be ordered ascending. Use the string "?" to order randomly. 191 191 192 .. note::193 194 Regardless of how many fields are in :attr:`~Options.ordering`, the admin195 site uses only the first field.196 197 192 For example, to order by a ``pub_date`` field ascending, use this:: 198 193 199 194 ordering = ['pub_date'] … … 206 201 207 202 ordering = ['-pub_date', 'author'] 208 203 204 .. versionchanged:: 1.4 205 206 The Django admin honors all elements in the list/tuple; before 1.4, only the first 207 was respected. 208 209 209 ``permissions`` 210 210 --------------- 211 211