Commit 32dbddd8 authored by rachbit's avatar rachbit

populated databases

parent 239c08c6
...@@ -18,7 +18,7 @@ class Migration(migrations.Migration): ...@@ -18,7 +18,7 @@ class Migration(migrations.Migration):
migrations.AddField( migrations.AddField(
model_name='album', model_name='album',
name='song_count', name='song_count',
field=models.IntegerField(default=''), field=models.IntegerField(default=0),
), ),
migrations.AddField( migrations.AddField(
model_name='artist', model_name='artist',
......
# Generated by Django 3.2 on 2023-02-20 08:59
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('homepage', '0002_auto_20230220_0853'),
]
operations = [
migrations.AlterField(
model_name='album',
name='song_count',
field=models.IntegerField(),
),
]
# Generated by Django 3.2 on 2023-02-20 09:12
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('homepage', '0003_alter_album_song_count'),
]
operations = [
migrations.AlterField(
model_name='album',
name='album_name',
field=models.TextField(),
),
migrations.AlterField(
model_name='album',
name='artist',
field=models.TextField(),
),
migrations.AlterField(
model_name='album',
name='description',
field=models.TextField(),
),
migrations.AlterField(
model_name='album',
name='label',
field=models.TextField(),
),
migrations.AlterField(
model_name='album',
name='release_date',
field=models.DateField(),
),
migrations.AlterField(
model_name='artist',
name='artist_name',
field=models.TextField(),
),
migrations.AlterField(
model_name='artist',
name='bio',
field=models.CharField(max_length=700),
),
migrations.AlterField(
model_name='artist',
name='birth_name',
field=models.TextField(),
),
migrations.AlterField(
model_name='artist',
name='monthly_listeners',
field=models.IntegerField(),
),
migrations.AlterField(
model_name='song',
name='album',
field=models.TextField(),
),
migrations.AlterField(
model_name='song',
name='artist',
field=models.TextField(),
),
migrations.AlterField(
model_name='song',
name='lyrics',
field=models.TextField(),
),
migrations.AlterField(
model_name='song',
name='song_length',
field=models.IntegerField(),
),
migrations.AlterField(
model_name='song',
name='song_title',
field=models.TextField(),
),
]
...@@ -4,25 +4,34 @@ from django.db import models ...@@ -4,25 +4,34 @@ from django.db import models
class Artist(models.Model): class Artist(models.Model):
artist_name = models.TextField(default="") artist_name = models.TextField()
monthly_listeners = models.IntegerField(default="") monthly_listeners = models.IntegerField()
birth_name = models.TextField(default="") birth_name = models.TextField()
bio = models.CharField(max_length=700, default="") bio = models.CharField(max_length=700)
def __str__(self):
return '{}'.format(self.artist_name)
class Album(models.Model): class Album(models.Model):
album_name = models.TextField(default="") album_name = models.TextField()
artist = models.TextField(default="") artist = models.TextField()
description = models.TextField(default="") description = models.TextField()
release_date = models.DateField(default="") release_date = models.DateField()
label = models.TextField(default="") label = models.TextField()
song_count = models.IntegerField(default="") song_count = models.IntegerField()
def __str__(self):
return '{}'.format(self.album_name)
class Song(models.Model): class Song(models.Model):
song_title = models.TextField(default="") song_title = models.TextField()
artist = models.TextField(default="") artist = models.TextField()
album = models.TextField(default="") album = models.TextField()
song_length = models.IntegerField(default="") song_length = models.IntegerField()
music_video = models.BooleanField(default=False) music_video = models.BooleanField(default=False)
lyrics = models.TextField(default="") lyrics = models.TextField()
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