Commit ca9469e8 authored by John Riz Daniel Ramos's avatar John Riz Daniel Ramos

Stored Data into Models

parent ef93c247
Pipeline #2765 failed with stages
......@@ -5,14 +5,23 @@ class Artist(models.Model):
artist_name = models.CharField(max_length=50)
monthly_listeners = models.IntegerField()
def __str__(self):
return '{}: {} '.format(self.artist_name, self.monthly_listeners)
class Album(models.Model):
album_name = models.CharField(max_length=50)
artist = models.CharField(max_length=50)
description = models.CharField(max_length=150)
release_date = models.CharField(max_length=50)
def __str__(self):
return '{}: {} '.format(self.album_name, self.artist, self.description, self.release_date)
class Song(models.Model):
song_title = models.CharField(max_length=50)
artist = models.CharField(max_length=50)
album = models.CharField(max_length=150)
song_length = models.IntegerField()
def __str__(self):
return '{}: {} '.format(self.song_title, self.artist, self.album, self.song_length)
\ 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