Commit af36d463 authored by Lance Cedric Tan's avatar Lance Cedric Tan

Fixed __str__ in all models.py files

parent d71e0ec1
Pipeline #2816 failed with stages
No preview for this file type
......@@ -10,7 +10,7 @@ class Artist(models.Model):
monthly_listeners = models.IntegerField()
def __str__(self):
return artist_name
return self.artist_name
def get_absolute_url(self):
return reverse('artist', args=[str(self.artist_name)])
......@@ -25,7 +25,7 @@ class Album(models.Model):
release_date = models.CharField(max_length=255)
def __str__(self):
return album_name
return self.album_name
def get_absolute_url(self):
return reverse('album', args=[str(self.album_name)])
......@@ -43,7 +43,7 @@ class SongInfo(models.Model):
song_length = models.IntegerField()
def __str__(self):
return song_title
return self.song_title
def get_absolute_url(self):
return reverse('song', args=[str(self.song_title)])
......@@ -10,7 +10,7 @@ class Artist(models.Model):
monthly_listeners = models.IntegerField()
def __str__(self):
return artist_name
return self.artist_name
def get_absolute_url(self):
return reverse('artist', args=[str(self.artist_name)])
......@@ -25,7 +25,7 @@ class Album(models.Model):
release_date = models.CharField(max_length=255)
def __str__(self):
return album_name
return self.album_name
def get_absolute_url(self):
return reverse('album', args=[str(self.album_name)])
......@@ -43,7 +43,7 @@ class SongInfo(models.Model):
song_length = models.IntegerField()
def __str__(self):
return song_title
return self.song_title
def get_absolute_url(self):
return reverse('song', args=[str(self.song_title)])
......@@ -10,7 +10,7 @@ class Artist(models.Model):
monthly_listeners = models.IntegerField()
def __str__(self):
return artist_name
return self.artist_name
def get_absolute_url(self):
return reverse('artist', args=[str(self.artist_name)])
......@@ -25,7 +25,7 @@ class Album(models.Model):
release_date = models.CharField(max_length=255)
def __str__(self):
return album_name
return self.album_name
def get_absolute_url(self):
return reverse('album', args=[str(self.album_name)])
......@@ -43,7 +43,7 @@ class SongInfo(models.Model):
song_length = models.IntegerField()
def __str__(self):
return song_title
return self.song_title
def get_absolute_url(self):
return reverse('song', args=[str(self.song_title)])
No preview for this file type
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