From: David ‘Bombe’ Roden Date: Thu, 9 May 2013 20:29:15 +0000 (+0200) Subject: Add sensible string representation. X-Git-Url: https://git.pterodactylus.net/?a=commitdiff_plain;h=2eed60505ecf322686b50d0c0f08195f8e2c6447;p=demoscenemusic.git Add sensible string representation. --- diff --git a/data/models.py b/data/models.py index 60e60b3..283f806 100644 --- a/data/models.py +++ b/data/models.py @@ -45,11 +45,17 @@ class TrackArtist(models.Model): artist = models.ForeignKey(Artist) order = models.IntegerField() + def __unicode__(self): + return self.artist.name + class RemixArtist(models.Model): track = models.ForeignKey('Track') artist = models.ForeignKey(Artist) order = models.IntegerField() + def __unicode__(self): + return self.artist.name + class Track(models.Model): name = models.CharField(max_length = 150) artists = models.ManyToManyField(Artist, through = TrackArtist)