Edit fields of models and reset database entries

parent 35f9551f
......@@ -2,12 +2,10 @@ Joaquin Inigo N. Crisologo
CSCI 40-F
211655
Lab 01: Song Library
Feb. 13, 2023
Lab 02: Song Library v2
Feb. 21, 2023
This lab activity was truthfully accomplished without the use of resources outside of provided lecture slides.
Signed, Joaquin Inigo N. Crisologo, Feb. 13, 2023
[Note: Unfortunately, I was unable to get settings.py to read the secret key from .env even after the instructions given in lecture 7. Because of this, I unfortunately had to leave the secret key in settings.py in order to get the Django project to function.]
\ No newline at end of file
Signed, Joaquin Inigo N. Crisologo, Feb. 21, 2023
\ No newline at end of file
No preview for this file type
# Generated by Django 3.2 on 2023-02-21 11:58
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('homepage', '0002_auto_20230213_2245'),
]
operations = [
migrations.AddField(
model_name='album',
name='label',
field=models.CharField(default=None, max_length=100),
),
migrations.AddField(
model_name='album',
name='song_count',
field=models.IntegerField(default=0),
),
migrations.AddField(
model_name='artist',
name='bio',
field=models.CharField(default=None, max_length=700),
),
migrations.AddField(
model_name='artist',
name='birth_name',
field=models.CharField(default=None, max_length=100),
),
migrations.AddField(
model_name='song',
name='lyrics',
field=models.CharField(default=None, max_length=2000),
),
migrations.AddField(
model_name='song',
name='music_video',
field=models.BooleanField(default=False),
),
migrations.AlterField(
model_name='album',
name='description',
field=models.CharField(max_length=700),
),
]
# Generated by Django 3.2 on 2023-02-21 11:59
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('homepage', '0003_auto_20230221_1958'),
]
operations = [
migrations.AlterField(
model_name='album',
name='label',
field=models.CharField(default='', max_length=100),
),
migrations.AlterField(
model_name='artist',
name='bio',
field=models.CharField(default='', max_length=700),
),
migrations.AlterField(
model_name='artist',
name='birth_name',
field=models.CharField(default='', max_length=100),
),
migrations.AlterField(
model_name='song',
name='lyrics',
field=models.CharField(default='', max_length=2000),
),
]
# Generated by Django 3.2 on 2023-02-21 12:03
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('homepage', '0004_auto_20230221_1959'),
]
operations = [
migrations.AlterField(
model_name='album',
name='label',
field=models.CharField(max_length=100),
),
migrations.AlterField(
model_name='artist',
name='bio',
field=models.CharField(max_length=700),
),
migrations.AlterField(
model_name='artist',
name='birth_name',
field=models.CharField(max_length=100),
),
migrations.AlterField(
model_name='song',
name='lyrics',
field=models.CharField(max_length=2000),
),
migrations.AlterField(
model_name='song',
name='music_video',
field=models.BooleanField(),
),
]
# Generated by Django 3.2 on 2023-02-21 12:06
from django.db import migrations
class Migration(migrations.Migration):
dependencies = [
('homepage', '0005_auto_20230221_2003'),
]
operations = [
migrations.RemoveField(
model_name='album',
name='label',
),
migrations.RemoveField(
model_name='album',
name='song_count',
),
migrations.RemoveField(
model_name='artist',
name='bio',
),
migrations.RemoveField(
model_name='artist',
name='birth_name',
),
migrations.RemoveField(
model_name='song',
name='lyrics',
),
migrations.RemoveField(
model_name='song',
name='music_video',
),
]
# Generated by Django 3.2 on 2023-02-21 12:12
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('homepage', '0006_auto_20230221_2006'),
]
operations = [
migrations.AddField(
model_name='album',
name='label',
field=models.CharField(default='', max_length=100),
preserve_default=False,
),
migrations.AddField(
model_name='album',
name='song_count',
field=models.IntegerField(default=0),
),
migrations.AddField(
model_name='artist',
name='bio',
field=models.CharField(default='', max_length=700),
preserve_default=False,
),
migrations.AddField(
model_name='artist',
name='birth_name',
field=models.CharField(default='', max_length=100),
preserve_default=False,
),
migrations.AddField(
model_name='song',
name='lyrics',
field=models.CharField(default='', max_length=2000),
preserve_default=False,
),
migrations.AddField(
model_name='song',
name='music_video',
field=models.BooleanField(default=False),
preserve_default=False,
),
]
......@@ -5,15 +5,21 @@ from django.db import models
class Artist(models.Model):
artist_name = models.CharField(max_length=100)
monthly_listeners = models.IntegerField()
birth_name = models.CharField(max_length=100)
bio = models.CharField(max_length=700)
class Album(models.Model):
album_name = models.CharField(max_length=100)
artist = models.CharField(max_length=100)
description = models.CharField(max_length=1000)
description = models.CharField(max_length=700)
release_date = models.IntegerField()
label = models.CharField(max_length=100)
song_count = models.IntegerField(default=0)
class Song(models.Model):
song_title = models.CharField(max_length=100)
artist = models.CharField(max_length=100)
album = models.CharField(max_length=100)
song_length = models.IntegerField()
music_video = models.BooleanField()
lyrics = models.CharField(max_length=2000)
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