Add group model.
authorDavid ‘Bombe’ Roden <bombe@demoscenemusic.org>
Wed, 8 May 2013 20:25:54 +0000 (22:25 +0200)
committerDavid ‘Bombe’ Roden <bombe@demoscenemusic.org>
Wed, 8 May 2013 20:25:54 +0000 (22:25 +0200)
data/models.py

index 95e69eb..93ef724 100644 (file)
@@ -5,3 +5,11 @@ class Artist(models.Model):
 
        def __unicode__(self):
                return name
+
+class Group(models.Model):
+       name = models.CharField(max_length = 80)
+       website = models.CharField(max_length = 150)
+       artists = models.ManyToManyField(Artist)
+
+       def __unicode__(self):
+               return self.name + " (" + self.website + ")"