Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
B
bellapanghulan_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
Ysabella Panghulan
bellapanghulan_music
Commits
29595899
Commit
29595899
authored
Feb 21, 2023
by
Ysabella Panghulan
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
edited the list display for Song model
parent
d5dbafa3
Changes
6
Show whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
11 additions
and
2 deletions
+11
-2
.DS_Store
bellapanghulan_music/about/.DS_Store
+0
-0
db.sqlite3
bellapanghulan_music/db.sqlite3
+0
-0
admin.cpython-310.pyc
...anghulan_music/homepage/__pycache__/admin.cpython-310.pyc
+0
-0
models.cpython-310.pyc
...nghulan_music/homepage/__pycache__/models.cpython-310.pyc
+0
-0
admin.py
bellapanghulan_music/homepage/admin.py
+1
-1
models.py
bellapanghulan_music/homepage/models.py
+10
-1
No files found.
bellapanghulan_music/about/.DS_Store
0 → 100644
View file @
29595899
File added
bellapanghulan_music/db.sqlite3
View file @
29595899
No preview for this file type
bellapanghulan_music/homepage/__pycache__/admin.cpython-310.pyc
View file @
29595899
No preview for this file type
bellapanghulan_music/homepage/__pycache__/models.cpython-310.pyc
View file @
29595899
No preview for this file type
bellapanghulan_music/homepage/admin.py
View file @
29595899
...
...
@@ -17,7 +17,7 @@ class AlbumAdmin(admin.ModelAdmin):
class
SongAdmin
(
admin
.
ModelAdmin
):
model
=
Song
list_display
=
(
'song_title'
,
'song_length'
,
'
music_video'
,
'lyrics
'
)
list_display
=
(
'song_title'
,
'song_length'
,
'
lyrics'
,
'music_video
'
)
search_fields
=
[
'song_title'
,
'lyrics'
]
list_filter
=
(
'song_title'
,
)
...
...
bellapanghulan_music/homepage/models.py
View file @
29595899
...
...
@@ -6,6 +6,9 @@ class Artist(models.Model):
birth_name
=
models
.
CharField
(
max_length
=
50
,
null
=
True
,
blank
=
True
)
bio
=
models
.
TextField
(
max_length
=
700
,
null
=
True
,
blank
=
True
)
def
__str__
(
self
):
return
self
.
artist_name
class
Album
(
models
.
Model
):
album_name
=
models
.
CharField
(
max_length
=
255
)
...
...
@@ -15,6 +18,9 @@ class Album(models.Model):
label
=
models
.
CharField
(
max_length
=
255
,
null
=
True
,
blank
=
True
)
song_count
=
models
.
IntegerField
(
default
=
0
)
def
__str__
(
self
):
return
self
.
album_name
class
Song
(
models
.
Model
):
song_title
=
models
.
CharField
(
max_length
=
50
)
artist
=
models
.
ForeignKey
(
Artist
,
on_delete
=
models
.
CASCADE
)
...
...
@@ -22,3 +28,6 @@ class Song(models.Model):
song_length
=
models
.
IntegerField
(
default
=
0
)
music_video
=
models
.
BooleanField
(
default
=
False
)
lyrics
=
models
.
TextField
(
null
=
True
,
blank
=
True
)
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