updated the models of About and Homepage apps

parent 03bc2e90
from django.db import models from django.db import models
class Artist(models.Model): # Create your models here.
artist_name = models.TextField() \ No newline at end of file
monthly_listeners = models.IntegerField()
class Album(models.Model):
album_name = models.TextField()
artist = models.ForeignKey(Artist, on_delete=models.CASCADE)
description = models.TextField()
release_date = models.DateField()
class Song(models.Model):
song_title = models.TextField()
artist = models.ForeignKey(Artist, on_delete=models.CASCADE)
album = models.ForeignKey(Album, on_delete=models.CASCADE)
song_length = models.IntegerField()
\ No newline at end of file
from django.db import models from django.db import models
# Create your models here. class Artist(models.Model):
artist_name = models.TextField()
monthly_listeners = models.IntegerField()
class Album(models.Model):
album_name = models.TextField()
artist = models.ForeignKey(Artist, on_delete=models.CASCADE)
description = models.TextField()
release_date = models.DateField()
class Song(models.Model):
song_title = models.TextField()
artist = models.ForeignKey(Artist, on_delete=models.CASCADE)
album = models.ForeignKey(Album, on_delete=models.CASCADE)
song_length = models.IntegerField()
\ 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