Skip to content

Commit

Permalink
Should use "ordering" in model Meta, not order_by
Browse files Browse the repository at this point in the history
  • Loading branch information
Alex Tsai authored and Alex Tsai committed Apr 1, 2015
1 parent ba951f3 commit fbd8c18
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion docs/api-guide/relations.md
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit fbd8c18

Please sign in to comment.