Windows media player

Soort van. Een begin eraan in ieder geval
This commit is contained in:
2024-02-12 15:02:43 +01:00
parent 963ab7f0bf
commit dfbdcf1459
6 changed files with 93 additions and 11 deletions
+1
View File
@@ -10,3 +10,4 @@ class Album(models.Model):
album_type = models.CharField(max_length=255)
total_tracks = models.PositiveSmallIntegerField(null=True)
image = models.ImageField(upload_to="albums/")
image_url = models.URLField(null=True)
+6
View File
@@ -15,6 +15,12 @@ class Track(models.Model):
s += " door "
s += " & ".join(artists)
return s
@property
def artist(self):
if self.artists.count() > 0:
artists = list(map(lambda a:a.name, self.artists.all()))
return " & ".join(artists)
id = models.CharField(primary_key=True, max_length=128)
name = models.CharField(max_length=255)
artists = models.ManyToManyField(Artist)