Commit 24a3ad2e authored by Nics De Vega's avatar Nics De Vega

populated values for models

parent 887f2856
......@@ -6,6 +6,9 @@ class Artist(models.Model):
bio = models.TextField(max_length=700,default="")
monthly_listeners = models.IntegerField(default=0)
def __str__(self):
return 'Artist Added: {}'.format(self.artist_name)
class Album(models.Model):
album_name = models.CharField(max_length=100,default="")
artist = models.ForeignKey(Artist, on_delete=models.CASCADE)
......@@ -14,6 +17,10 @@ class Album(models.Model):
label = models.CharField(max_length=100,default="")
song_count = models.IntegerField(default=0)
def __str__(self):
return 'Album Added: {}'.format(self.album_name)
class Song(models.Model):
song_title = models.CharField(max_length=100,default="")
artist = models.ForeignKey(Artist, on_delete=models.CASCADE)
......@@ -21,3 +28,7 @@ class Song(models.Model):
song_length = models.IntegerField(default=0)
music_video = models.BooleanField(default=False)
lyrics = models.TextField(default="")
def __str__(self):
return 'Song Added: {}'.format(self.song_title)
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