Commit 6a561ed4 authored by Jan Ericsson Ong Ang's avatar Jan Ericsson Ong Ang

Jan

Updated the models.py in the homepage too fit the Lab 2 specs
parent 3697ef8a
models.py
\ No newline at end of file
...@@ -4,7 +4,7 @@ ...@@ -4,7 +4,7 @@
<content url="file://$MODULE_DIR$"> <content url="file://$MODULE_DIR$">
<excludeFolder url="file://$MODULE_DIR$/myenv" /> <excludeFolder url="file://$MODULE_DIR$/myenv" />
</content> </content>
<orderEntry type="inheritedJdk" /> <orderEntry type="jdk" jdkName="Python 3.10" jdkType="Python SDK" />
<orderEntry type="sourceFolder" forTests="false" /> <orderEntry type="sourceFolder" forTests="false" />
</component> </component>
<component name="PyDocumentationSettings"> <component name="PyDocumentationSettings">
......
<?xml version="1.0" encoding="UTF-8"?> <?xml version="1.0" encoding="UTF-8"?>
<project version="4"> <project version="4">
<component name="ProjectRootManager" version="2" project-jdk-name="Python 3.10 (janang_music) (2)" project-jdk-type="Python SDK" /> <component name="ProjectRootManager" version="2" project-jdk-name="Python 3.10" project-jdk-type="Python SDK" />
<component name="PyCharmProfessionalAdvertiser"> <component name="PyCharmProfessionalAdvertiser">
<option name="shown" value="true" /> <option name="shown" value="true" />
</component> </component>
......
from django.db import models from django.db import models
# Create your models here. # Create your models here.
class IndexCard(models.Model): class Artist(models.Model):
artist_name=models.CharField(max_length=420) artist_name = models.CharField(max_length=50)
monthly_listeners = models.IntegerField(default=0) monthly_listeners = models.IntegerField(default = 0)
birth_name = models.CharField(max_length= 50, default = "")
bio = models.CharField(max_length = 700, default = "")
def __str__(self):
return self.artist_name
class Album(models.Model): class Album(models.Model):
album_name = models.CharField(max_length=50) album_name = models.CharField(max_length=50)
artist = models.CharField(max_length=50) artist = models.CharField(max_length=50)
description = models.CharField(max_length=500) description = models.CharField(max_length=500)
release_date = models.DateTimeField("date released") release_date = models.DateTimeField("date released")
label = models.CharField(max_length= 50, default = "")
song_count = models.CharField(max_length= 50, default = "")
def __str__(self):
return self.album_name
class Song(models.Model): class Song(models.Model):
song_title = models.CharField(max_length = 50) song_title = models.CharField(max_length = 50)
artist = models.CharField(max_length = 50) artist = models.CharField(max_length = 50)
album = models.CharField(max_length = 50) album = models.CharField(max_length = 50)
song_length = models.IntegerField() song_length = models.IntegerField(default = 0)
\ No newline at end of file music_video = models.BooelanField(default = False)
lyrics = models.TextField(default = "")
def __str__(self):
return self.song_title
\ 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