Commit 702197f5 authored by Ysobel Vera's avatar Ysobel Vera

Revert "Update models.py to remove unnecessary code"

This reverts commit e2104a19
parent e2104a19
Pipeline #2745 failed with stages
......@@ -5,6 +5,12 @@ class Artist(models.Model):
artist_name = models.CharField(max_length=200,unique=True)
monthly_listeners = models.IntegerField()
def __str__(self):
return '{}: {} listeners'.format(self.artist_name, self.monthly_listeners)
def get_absolute_url(self):
return reverse('artist_detail', args=[str(self.artist_name)])
class Album(models.Model):
album_name = models.CharField(max_length=200)
artist = models.ForeignKey(
......
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