Should use "ordering" in model Meta, not order_by

This commit is contained in:
Alex Tsai 2015-03-31 17:30:04 -07:00
parent ba951f3339
commit fbd8c18abd

View File

@ -46,7 +46,7 @@ In order to explain the various types of relational fields, we'll use a couple o
class Meta: class Meta:
unique_together = ('album', 'order') unique_together = ('album', 'order')
order_by = 'order' ordering = ['order']
def __unicode__(self): def __unicode__(self):
return '%d: %s' % (self.order, self.title) return '%d: %s' % (self.order, self.title)