Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
T
tanyayotoko_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
Tanya Yotoko
tanyayotoko_music
Commits
db6b5602
Commit
db6b5602
authored
Feb 20, 2023
by
Tanya
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Updated models.py with additional attributes
parent
401aff20
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
31 additions
and
16 deletions
+31
-16
.DS_Store
.DS_Store
+0
-0
.DS_Store
tanyayotoko_music/.DS_Store
+0
-0
models.py
tanyayotoko_music/about/models.py
+0
-15
models.py
tanyayotoko_music/homepage/models.py
+31
-1
No files found.
.DS_Store
View file @
db6b5602
No preview for this file type
tanyayotoko_music/.DS_Store
View file @
db6b5602
No preview for this file type
tanyayotoko_music/about/models.py
View file @
db6b5602
from
django.db
import
models
from
django.db
import
models
class
Artist
(
models
.
Model
):
artist_name
=
models
.
TextField
()
monthly_listeners
=
models
.
IntegerField
()
class
Album
(
models
.
Model
):
album_name
=
models
.
TextField
()
artist
=
models
.
TextField
()
description
=
models
.
TextField
()
release_date
=
models
.
DateField
()
class
Song
(
models
.
Model
):
song_title
=
models
.
TextField
()
artist
=
models
.
TextField
()
album
=
models
.
TextField
()
song_length
=
models
.
IntegerField
()
tanyayotoko_music/homepage/models.py
View file @
db6b5602
from
django.db
import
models
from
django.db
import
models
# Create your models here.
class
Artist
(
models
.
Model
):
artist_name
=
models
.
TextField
(
default
=
""
)
monthly_listeners
=
models
.
IntegerField
(
default
=
0
)
birth_name
=
models
.
TextField
(
default
=
""
)
bio
=
models
.
TextField
(
max_length
=
700
,
default
=
""
)
def
__str__
(
self
):
return
'{}'
.
format
(
self
.
artist_name
)
class
Album
(
models
.
Model
):
album_name
=
models
.
TextField
(
default
=
""
)
artist
=
models
.
ForeignKey
(
Artist
,
on_delete
=
models
.
CASCADE
)
description
=
models
.
TextField
(
default
=
""
)
release_date
=
models
.
DateField
()
label
=
models
.
TextField
(
default
=
""
)
song_count
=
models
.
IntegerField
(
default
=
0
)
def
__str__
(
self
):
return
'{}'
.
format
(
self
.
album_name
)
class
Song
(
models
.
Model
):
song_title
=
models
.
TextField
(
default
=
""
)
artist
=
models
.
ForeignKey
(
Artist
,
on_delete
=
models
.
CASCADE
)
album
=
models
.
ForeignKey
(
Album
,
on_delete
=
models
.
CASCADE
)
song_length
=
models
.
IntegerField
(
default
=
0
)
music_video
=
models
.
BooleanField
(
default
=
False
)
lyrics
=
models
.
TextField
(
default
=
""
)
def
__str__
(
self
):
return
'{}'
.
format
(
self
.
song_title
)
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