projects
/
demoscenemusic.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
2eed605
)
Order track artists by the given order.
author
David ‘Bombe’ Roden
<bombe@demoscenemusic.org>
Thu, 9 May 2013 20:29:36 +0000
(22:29 +0200)
committer
David ‘Bombe’ Roden
<bombe@demoscenemusic.org>
Thu, 9 May 2013 20:29:36 +0000
(22:29 +0200)
data/models.py
patch
|
blob
|
history
diff --git
a/data/models.py
b/data/models.py
index
283f806
..
58bb974
100644
(file)
--- 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)