Commit 8abba79d authored by Albert's avatar Albert

finished setting up the admin panel

parent 13936a11
# Generated by Django 4.1.6 on 2023-02-13 15:36
from django.db import migrations, models
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",
),
),
("artist", models.CharField(max_length=100, unique=True)),
("album_name", models.CharField(max_length=100, unique=True)),
("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=100, unique=True)),
("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=100, unique=True)),
("artist", models.CharField(max_length=50)),
("description", models.TextField()),
("song_length", models.IntegerField()),
],
),
]
......@@ -3,24 +3,24 @@ from django.db import models
# Create your models here.
class Artist(models.Model):
artist_name = models.CharField(max_length=50, unique=True)
monthly_listeners = models.PositiveIntegerField()
birth_name = models.CharField(max_length=100, unique=True)
bio = models.TextField(max_length = 700)
artist_name = models.CharField(default="",max_length=50)
monthly_listeners = models.PositiveIntegerField(default=0)
birth_name = models.CharField(default="", max_length=100)
bio = models.TextField(default="", max_length = 700)
class Album(models.Model):
artist = models.CharField(max_length=50,unique=True)
album_name = models.CharField(max_length=50, unique=True)
description = models.TextField()
artist = models.CharField(default="", max_length=50)
album_name = models.CharField(default="", max_length=50)
description = models.TextField(default="")
release_date = models.DateField()
label = models.CharField(max_length=50)
song_count = models.PositiveIntegerField()
label = models.CharField(default="", max_length=50)
song_count = models.PositiveIntegerField(default=0)
class Song(models.Model):
song_title = models.CharField(max_length=50, unique=True)
artist = models.CharField(max_length=50)
description = models.TextField()
song_length = models.PositiveIntegerField()
song_title = models.CharField(default="", max_length=50)
artist = models.CharField(default="", max_length=50)
music_video = models.BooleanField(default=False)
lyrics = models.TextField()
\ No newline at end of file
song_length = models.PositiveIntegerField(default=0)
lyrics = models.TextField(default="")
description = models.TextField(default="")
\ No newline at end of file
......@@ -2,10 +2,6 @@ from django.shortcuts import render
# Create your views here.
from django.shortcuts import render
# Create your views here.
from django.http import HttpResponse
def index(request):
......
......@@ -17,7 +17,6 @@ from django.contrib import admin
from django.urls import path, include
urlpatterns = [
path('', include('homepage.urls', namespace='homepage')),
path('homepage/', include('homepage.urls', namespace="homepage")),
path('about/', include('about.urls', namespace="about")),
path('contact/', include('contact.urls', namespace="contact")),
......
No preview for this file type
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