Commit 36046f4e authored by Jayson Lim's avatar Jayson Lim

Modified the artist and album attributes, utilized the foreignkey

parent e6dde81a
......@@ -8,7 +8,7 @@ class Artist(models.Model):
class Album(models.Model):
album_name = models.CharField(max_length=255)
artist = models.CharField(max_length=255)
artist = models.ForeignKey(Artist, null=True, default=True, on_delete=models.SET_DEFAULT)
description = models.CharField(max_length=255)
release_date = models.CharField(max_length=255)
label = models.CharField(max_length=255,default=True)
......@@ -16,8 +16,8 @@ class Album(models.Model):
class Song(models.Model):
song_title = models.CharField(max_length=255)
artist = models.CharField(max_length=255)
album = models.CharField(max_length=255)
artist = models.ForeignKey(Artist, null=True, default=True, on_delete=models.SET_DEFAULT)
album = models.ForeignKey(Album, null=True, default=True, on_delete=models.SET_DEFAULT)
song_length = models.IntegerField()
music_video = models.BooleanField(default=True)
lyrics = models.TextField(null=True, blank=True)
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