Commit 04cb3deb authored by Ciella's avatar Ciella

Commit after populating the models with data from the admin panel

parent 03523c56
......@@ -7,6 +7,9 @@ class Artist(models.Model):
birth_name = models.CharField(max_length=255, default='')
bio = models.TextField(max_length=700, default='')
def __str__(self):
return '{}'.format(self.artist_name)
class Album(models.Model):
album_name = models.CharField(max_length=255)
......@@ -16,6 +19,9 @@ class Album(models.Model):
label = models.CharField(max_length=255, default='')
song_count = models.IntegerField(default=1)
def __str__(self):
return '{}'.format(self.album_name)
class Song(models.Model):
song_title = models.CharField(max_length=255)
......@@ -23,4 +29,7 @@ class Song(models.Model):
album = models.ForeignKey(Album, on_delete=models.CASCADE)
song_length = models.DurationField()
music_video = models.BooleanField(default=False)
lyrics = models.TextField(default='')
\ No newline at end of file
lyrics = models.TextField(default='')
def __str__(self):
return '{}'.format(self.song_title)
\ No newline at end of file
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