Commit 5d883345 authored by Eldon Dagdag's avatar Eldon Dagdag

Populated Models

parent 94aab154
eldondagdag_music/.env
\ No newline at end of file
# Generated by Django 3.2 on 2023-02-20 08:43
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('homepage', '0002_auto_20230220_0717'),
]
operations = [
migrations.AlterField(
model_name='song',
name='lyrics',
field=models.TextField(blank=True, default=''),
),
]
......@@ -6,6 +6,9 @@ class Artist(models.Model):
monthly_listeners = models.IntegerField(default=0)
bio = models.TextField(max_length=700, blank=True, default="")
def __str__(self):
return '{}'.format(self.artist_name)
class Album(models.Model):
album_name = models.CharField(max_length=255, default="")
artist = models.CharField(max_length=255, default="")
......@@ -14,11 +17,17 @@ class Album(models.Model):
label = models.CharField(max_length=255, default="")
song_count = models.IntegerField(default=0)
def __str__(self):
return '{}'.format(self.album_name)
class Song(models.Model):
song_title = models.CharField(max_length=255, default="")
artist = models.CharField(max_length=255, default="")
album = models.CharField(max_length=255, default="")
song_length = models.IntegerField(default=0)
music_video = models.BooleanField(default=False)
lyrics = models.TextField(default="")
lyrics = models.TextField(blank=True, default="")
def __str__(self):
return '{}'.format(self.song_title)
# Create your models here.
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