Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
D
danielramos_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
John Riz Daniel Ramos
danielramos_music
Commits
ca9469e8
Commit
ca9469e8
authored
Feb 13, 2023
by
John Riz Daniel Ramos
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Stored Data into Models
parent
ef93c247
Pipeline
#2765
failed with stages
Changes
3
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
10 additions
and
1 deletion
+10
-1
db.sqlite3
danielramos_music/db.sqlite3
+0
-0
models.cpython-39.pyc
danielramos_music/homepage/__pycache__/models.cpython-39.pyc
+0
-0
models.py
danielramos_music/homepage/models.py
+10
-1
No files found.
danielramos_music/db.sqlite3
View file @
ca9469e8
No preview for this file type
danielramos_music/homepage/__pycache__/models.cpython-39.pyc
View file @
ca9469e8
No preview for this file type
danielramos_music/homepage/models.py
View file @
ca9469e8
...
@@ -4,15 +4,24 @@ from django.db import models
...
@@ -4,15 +4,24 @@ from django.db import models
class
Artist
(
models
.
Model
):
class
Artist
(
models
.
Model
):
artist_name
=
models
.
CharField
(
max_length
=
50
)
artist_name
=
models
.
CharField
(
max_length
=
50
)
monthly_listeners
=
models
.
IntegerField
()
monthly_listeners
=
models
.
IntegerField
()
def
__str__
(
self
):
return
'{}: {} '
.
format
(
self
.
artist_name
,
self
.
monthly_listeners
)
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
=
150
)
description
=
models
.
CharField
(
max_length
=
150
)
release_date
=
models
.
CharField
(
max_length
=
50
)
release_date
=
models
.
CharField
(
max_length
=
50
)
def
__str__
(
self
):
return
'{}: {} '
.
format
(
self
.
album_name
,
self
.
artist
,
self
.
description
,
self
.
release_date
)
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
=
150
)
album
=
models
.
CharField
(
max_length
=
150
)
song_length
=
models
.
IntegerField
()
song_length
=
models
.
IntegerField
()
\ No newline at end of file
def
__str__
(
self
):
return
'{}: {} '
.
format
(
self
.
song_title
,
self
.
artist
,
self
.
album
,
self
.
song_length
)
\ 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