mirror of
https://github.com/encode/django-rest-framework.git
synced 2024-11-26 03:23:59 +03:00
Should use "ordering" in model Meta, not order_by
This commit is contained in:
parent
ba951f3339
commit
fbd8c18abd
|
@ -46,7 +46,7 @@ In order to explain the various types of relational fields, we'll use a couple o
|
|||
|
||||
class Meta:
|
||||
unique_together = ('album', 'order')
|
||||
order_by = 'order'
|
||||
ordering = ['order']
|
||||
|
||||
def __unicode__(self):
|
||||
return '%d: %s' % (self.order, self.title)
|
||||
|
|
Loading…
Reference in New Issue
Block a user