Opened 16 years ago
Closed 16 years ago
#10748 closed (invalid)
Incorrect example code for ordering in class Meta:
Description ¶
http://www.djangoproject.com/documentation/models/ordering/
Has
class Meta:
ordering = ('-pub_date', 'headline')
should be
class Meta:
ordering = ['-pub_date', 'headline']
Note:
See TracTickets
for help on using tickets.
No, ordering (and most/all such settings) can be a tuple: http://docs.djangoproject.com/en/dev/ref/models/options/#ordering. There's nothing wrong with the example as it is.