From f1dbafd464ea40d7c487a054a8af94c3e3e2b5a9 Mon Sep 17 00:00:00 2001 From: =?utf8?q?David=20=E2=80=98Bombe=E2=80=99=20Roden?= Date: Thu, 9 May 2013 22:29:36 +0200 Subject: [PATCH] Order track artists by the given order. --- data/models.py | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/data/models.py b/data/models.py index 283f806..58bb974 100644 --- a/data/models.py +++ b/data/models.py @@ -48,6 +48,9 @@ class TrackArtist(models.Model): def __unicode__(self): return self.artist.name + class Meta: + ordering = ['order'] + class RemixArtist(models.Model): track = models.ForeignKey('Track') artist = models.ForeignKey(Artist) @@ -56,6 +59,9 @@ class RemixArtist(models.Model): def __unicode__(self): return self.artist.name + class Meta: + ordering = ['order'] + class Track(models.Model): name = models.CharField(max_length = 150) artists = models.ManyToManyField(Artist, through = TrackArtist) -- 2.7.4