Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
J
janang_music
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Jan Ericsson Ong Ang
janang_music
Commits
6a561ed4
Commit
6a561ed4
authored
Feb 21, 2023
by
Jan Ericsson Ong Ang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Jan
Updated the models.py in the homepage too fit the Lab 2 specs
parent
3697ef8a
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
22 additions
and
6 deletions
+22
-6
.name
.idea/.name
+1
-0
janang_music.iml
.idea/janang_music.iml
+1
-1
misc.xml
.idea/misc.xml
+1
-1
models.py
janang_music/homepage/models.py
+19
-4
No files found.
.idea/.name
0 → 100644
View file @
6a561ed4
models.py
\ No newline at end of file
.idea/janang_music.iml
View file @
6a561ed4
...
@@ -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"
>
...
...
.idea/misc.xml
View file @
6a561ed4
<?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>
...
...
janang_music/homepage/models.py
View file @
6a561ed4
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
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment