Commit ebfd58c9 authored by Albert's avatar Albert

Final implementation of models + migration

parent 517eb034
......@@ -7,13 +7,8 @@ class Artist(models.Model):
monthly_listeners = models.IntegerField()
class Album(models.Model):
"""artist = models.ForeignKey(
Artist,
on_delete=models.cascade,
related_name=''
)""""
artist = models.CharField(max_length=100,unique=True)
album_name = models.CharField(max_length=100, unique=true)
album_name = models.CharField(max_length=100, unique=True)
description = models.TextField()
release_date = models.DateField()
......
......@@ -9,4 +9,4 @@ from django.shortcuts import render
from django.http import HttpResponse
def index(request):
return HttpResponse('I'm really into a lot of music styles, but as of right now, I actively listen to a lot of Electronic music, J-pop/rock, and K-rnb. (plus some New Jeans)')
\ No newline at end of file
return HttpResponse("I'm really into a lot of music styles, but as of right now, I actively listen to a lot of Electronic music, J-pop/rock, and K-rnb. (plus some New Jeans)")
\ No newline at end of file
......@@ -9,9 +9,12 @@ https://docs.djangoproject.com/en/4.1/topics/settings/
For the full list of settings and their values, see
https://docs.djangoproject.com/en/4.1/ref/settings/
"""
import os
from pathlib import Path
from dotenv import load_dotenv
load_dotenv()
# Build paths inside the project like this: BASE_DIR / 'subdir'.
BASE_DIR = Path(__file__).resolve().parent.parent
......
......@@ -14,10 +14,9 @@ Including another URLconf
2. Add a URL to urlpatterns: path('blog/', include('blog.urls'))
"""
from django.contrib import admin
from django.urls import path
from django.urls import path, include
urlpatterns = [
"""path('', include('food.urls', namespace="food")),""""
path('homepage/', include('homepage.urls', namespace="homepage")),
path('about/', include('about.urls', namespace="about")),
path('contact/', include('contact.urls', namespace="contact")),
......
......@@ -9,4 +9,4 @@ from django.shortcuts import render
from django.http import HttpResponse
def index(request):
return HttpResponse('Contact me at my phone number!: +639420694242')
\ No newline at end of file
return HttpResponse("Contact me at my phone number!: +639420694242")
\ No newline at end of file
No preview for this file type
......@@ -9,4 +9,4 @@ from django.shortcuts import render
from django.http import HttpResponse
def index(request):
return HttpResponse('Welcome to Albert's Music Library!')
\ No newline at end of file
return HttpResponse("Welcome to Albert's Music Library!")
\ No newline at end of file
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