Commit 47fc111e authored by Brendan Fausto's avatar Brendan Fausto

Error fixes & migrations done

parent d227cad9
# Generated by Django 4.1.7 on 2023-02-16 13:00
from django.db import migrations, models
import django.db.models.deletion
class Migration(migrations.Migration):
initial = True
dependencies = [
]
operations = [
migrations.CreateModel(
name='Album',
fields=[
('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
('album_name', models.CharField(max_length=255)),
('description', models.TextField()),
('release_date', models.DateField()),
],
),
migrations.CreateModel(
name='Artist',
fields=[
('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
('artist_name', models.CharField(max_length=255)),
('monthly_listeners', models.IntegerField()),
],
),
migrations.CreateModel(
name='Song',
fields=[
('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
('song_title', models.CharField(max_length=255)),
('song_length', models.TimeField()),
('album', models.ForeignKey(on_delete=django.db.models.deletion.PROTECT, to='about.album')),
('artist', models.ForeignKey(on_delete=django.db.models.deletion.PROTECT, to='about.artist')),
],
),
migrations.AddField(
model_name='album',
name='artist',
field=models.ForeignKey(on_delete=django.db.models.deletion.PROTECT, to='about.artist'),
),
]
# about/urls.py
from django.urls import path from django.urls import path
from .views import index from .views import index
......
...@@ -44,7 +44,7 @@ INSTALLED_APPS = [ ...@@ -44,7 +44,7 @@ INSTALLED_APPS = [
'django.contrib.messages', 'django.contrib.messages',
'django.contrib.staticfiles', 'django.contrib.staticfiles',
'homepage', 'homepage',
'contact' 'contact',
'about' 'about'
] ]
......
"""brendanfausto_music URL Configuration """brendanfausto_music URL Configuration
The `urlpatterns` list routes URLs to views. For more information please see: The `urlpatterns` list routes URLs to views. For more information please see:
https://docs.djangoproject.com/en/4.1/topics/http/urls/ https://docs.djangoproject.com/en/4.1/topics/http/urls/
...@@ -14,7 +14,7 @@ Including another URLconf ...@@ -14,7 +14,7 @@ Including another URLconf
2. Add a URL to urlpatterns: path('blog/', include('blog.urls')) 2. Add a URL to urlpatterns: path('blog/', include('blog.urls'))
""" """
from django.contrib import admin from django.contrib import admin
from django.urls import path from django.urls import include, path
urlpatterns = [ urlpatterns = [
path('admin/', admin.site.urls), path('admin/', admin.site.urls),
......
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