Commit 44a6fdae authored by Julia Anishka's avatar Julia Anishka

added more attributes to album model

parent 717e87ae
...@@ -14,7 +14,12 @@ class Album(models.Model): ...@@ -14,7 +14,12 @@ class Album(models.Model):
album_name = models.CharField(max_length = 50) album_name = models.CharField(max_length = 50)
artist = models.ForeignKey(Artist, on_delete=models.CASCADE) artist = models.ForeignKey(Artist, on_delete=models.CASCADE)
description = models.CharField(max_length = 100) description = models.CharField(max_length = 100)
release_date = models.DateTimeField("date released") release_date = models.DateField("date released")
label = models.CharField(max_length = 100, null=True, blank=True)
song_count = models.IntegerField(default = 0)
def __str__(self):
return self.album_name
class Song(models.Model): class Song(models.Model):
song_title = models.CharField(max_length = 50) song_title = models.CharField(max_length = 50)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment