Build better artist names.
authorDavid ‘Bombe’ Roden <bombe@demoscenemusic.org>
Thu, 9 May 2013 20:40:40 +0000 (22:40 +0200)
committerDavid ‘Bombe’ Roden <bombe@demoscenemusic.org>
Thu, 9 May 2013 20:40:40 +0000 (22:40 +0200)
data/models.py

index 58bb974..5e0cc94 100644 (file)
@@ -15,7 +15,7 @@ class Artist(models.Model):
        groups = models.ManyToManyField(Group)
 
        def __unicode__(self):
-               return self.name
+               return "%s%s" % (self.name, (" / %s" % (" ^ ".join(g.shortName if (g.shortName != '') else g.name for g in self.groups.all()), )))
 
 class Party(models.Model):
        name = models.CharField(max_length = 80)