Commit 9da0f5b3 authored by Alliyah Marcelo's avatar Alliyah Marcelo

Finalized editing.

parent 12cde62f
Pipeline #2747 failed with stages
from django.db import models from django.db import models
# Create your models here. # Create your models here.
class Artist(models.Model):
artist_name = models.CharField(max_length=50)
monthly_listeners = models.IntegerField()
class Album(models.Model):
album_name = models.CharField(max_length=100)
artist = models.ForeignKey(
Artist,
on_delete=models.CASCADE,
related_name='album_artist'
)
description = models.CharField(max_length=1000)
release_date = models.CharField(max_length=50)
class Song(models.Model):
song_title = models.CharField(max_length=100)
artist = models.ForeignKey(
Artist,
on_delete=models.CASCADE,
related_name='song_artist'
)
album = models.ForeignKey(
Album,
on_delete=models.CASCADE,
related_name='song_album'
)
song_length = models.IntegerField()
...@@ -3,4 +3,4 @@ from django.http import HttpResponse ...@@ -3,4 +3,4 @@ from django.http import HttpResponse
# Create your views here. # Create your views here.
def index(request): def index(request):
return HttpResponse("Hi! I'm Alliyah. I like listening to a variety of music genres, but I usually listen to pop, indie, and rock the most.") return HttpResponse("Hi! I'm Alliyah and I like listening to music. My top genres are: pop, indie, and rock.")
\ No newline at end of file \ 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