Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
D
drewidquival_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
Andrew Justin C. Idquival
drewidquival_music
Commits
bb0870e3
Commit
bb0870e3
authored
Mar 01, 2023
by
Andrew Justin C. Idquival
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Changed the models into the right output
parent
aa2b9578
Changes
5
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
47 additions
and
5 deletions
+47
-5
db.sqlite3
drewidquival_music/db.sqlite3
+0
-0
models.cpython-310.pyc
...dquival_music/homepage/__pycache__/models.cpython-310.pyc
+0
-0
0001_initial.py
drewidquival_music/homepage/migrations/0001_initial.py
+42
-0
0001_initial.cpython-310.pyc
...epage/migrations/__pycache__/0001_initial.cpython-310.pyc
+0
-0
models.py
drewidquival_music/homepage/models.py
+5
-5
No files found.
drewidquival_music/db.sqlite3
View file @
bb0870e3
No preview for this file type
drewidquival_music/homepage/__pycache__/models.cpython-310.pyc
View file @
bb0870e3
No preview for this file type
drewidquival_music/homepage/migrations/0001_initial.py
0 → 100644
View file @
bb0870e3
# Generated by Django 3.2 on 2023-03-01 08:05
from
django.db
import
migrations
,
models
class
Migration
(
migrations
.
Migration
):
initial
=
True
dependencies
=
[
]
operations
=
[
migrations
.
CreateModel
(
name
=
'Album'
,
fields
=
[
(
'id'
,
models
.
BigAutoField
(
auto_created
=
True
,
primary_key
=
True
,
serialize
=
False
,
verbose_name
=
'ID'
)),
(
'album_name'
,
models
.
CharField
(
max_length
=
50
,
unique
=
True
)),
(
'artist'
,
models
.
CharField
(
max_length
=
50
)),
(
'description'
,
models
.
CharField
(
max_length
=
500
)),
(
'release_date'
,
models
.
CharField
(
max_length
=
50
)),
],
),
migrations
.
CreateModel
(
name
=
'Artist'
,
fields
=
[
(
'id'
,
models
.
BigAutoField
(
auto_created
=
True
,
primary_key
=
True
,
serialize
=
False
,
verbose_name
=
'ID'
)),
(
'artist_name'
,
models
.
CharField
(
max_length
=
50
,
unique
=
True
)),
(
'monthly_listeners'
,
models
.
IntegerField
()),
],
),
migrations
.
CreateModel
(
name
=
'Song'
,
fields
=
[
(
'id'
,
models
.
BigAutoField
(
auto_created
=
True
,
primary_key
=
True
,
serialize
=
False
,
verbose_name
=
'ID'
)),
(
'song_title'
,
models
.
CharField
(
max_length
=
50
,
unique
=
True
)),
(
'album'
,
models
.
CharField
(
max_length
=
50
)),
(
'artist'
,
models
.
CharField
(
max_length
=
500
)),
(
'song_length'
,
models
.
IntegerField
()),
],
),
]
drewidquival_music/homepage/migrations/__pycache__/0001_initial.cpython-310.pyc
0 → 100644
View file @
bb0870e3
File added
drewidquival_music/homepage/models.py
View file @
bb0870e3
...
...
@@ -10,7 +10,7 @@ class Artist(models.Model):
return
'{} | {} monthly listeners'
.
format
(
self
.
artist_name
,
self
.
monthly_listeners
)
def
get_absolute_url
(
self
):
return
reverse
(
'
subjec
t_detail'
,
args
=
[
str
(
self
.
artist_name
)])
return
reverse
(
'
artis
t_detail'
,
args
=
[
str
(
self
.
artist_name
)])
class
Album
(
models
.
Model
):
...
...
@@ -24,7 +24,7 @@ class Album(models.Model):
self
.
release_date
)
def
get_absolute_url
(
self
):
return
reverse
(
'
subject
_detail'
,
args
=
[
str
(
self
.
album_name
)])
return
reverse
(
'
album
_detail'
,
args
=
[
str
(
self
.
album_name
)])
class
Song
(
models
.
Model
):
...
...
@@ -34,8 +34,8 @@ class Song(models.Model):
song_length
=
models
.
IntegerField
()
def
__str__
(
self
):
return
'{} by {} |
{} | Released in {}
'
.
format
(
self
.
song_title
,
self
.
artist
,
self
.
album
,
return
'{} by {} |
Album: {} | {} seconds
'
.
format
(
self
.
song_title
,
self
.
artist
,
self
.
album
,
self
.
song_length
)
def
get_absolute_url
(
self
):
return
reverse
(
's
ubject
_detail'
,
args
=
[
str
(
self
.
song_title
)])
return
reverse
(
's
ong
_detail'
,
args
=
[
str
(
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