From 2eed60505ecf322686b50d0c0f08195f8e2c6447 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:15 +0200 Subject: [PATCH] Add sensible string representation. --- data/models.py | 6 ++++++ 1 file changed, 6 insertions(+) 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) -- 2.7.4