Commit 63ba2377 authored by Sharmaine Chua's avatar Sharmaine Chua

populated the database

parent b02478a8
......@@ -4,7 +4,7 @@ from .models import Artist, Album, Song
class ArtistAdmin(admin.ModelAdmin):
model = Artist
list_display = ('artist_name', 'birth_name', 'monthly_listener',)
list_display = ('artist_name', 'birth_name', 'monthly_listeners',)
search_fields = ('artist_name', 'birth_name',)
list_filter = ('artist_name', 'birth_name',)
......
......@@ -6,6 +6,9 @@ class Artist(models.Model):
birth_name = models.TextField(default="")
bio = models.TextField(max_length=700, default="")
def __str__(self):
return '{}'.format(self.artist_name)
class Album(models.Model):
album_name = models.TextField(default="")
artist = models.TextField(default="")
......@@ -14,6 +17,9 @@ class Album(models.Model):
label = models.TextField(default="")
song_count = models.IntegerField(default=0)
def __str__(self):
return '{}'.format(self.album_name)
class Song(models.Model):
song_title = models.TextField(default="")
artist = models.TextField(default="")
......@@ -21,3 +27,6 @@ class Song(models.Model):
song_length = models.IntegerField(default=0)
music_video = models.BooleanField(default=False)
lyrics = models.TextField(default="")
def __str__(self):
return '{}'.format(self.song_title)
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