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
85dc1812
Commit
85dc1812
authored
Feb 21, 2023
by
John Riz Daniel Ramos
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Model Population + Minor model changes in homepage
parent
0fe705a5
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
5 additions
and
5 deletions
+5
-5
db.sqlite3
danielramos_music/db.sqlite3
+0
-0
admin.cpython-311.pyc
danielramos_music/homepage/__pycache__/admin.cpython-311.pyc
+0
-0
models.cpython-311.pyc
...elramos_music/homepage/__pycache__/models.cpython-311.pyc
+0
-0
admin.py
danielramos_music/homepage/admin.py
+2
-2
models.py
danielramos_music/homepage/models.py
+3
-3
No files found.
danielramos_music/db.sqlite3
View file @
85dc1812
No preview for this file type
danielramos_music/homepage/__pycache__/admin.cpython-311.pyc
View file @
85dc1812
No preview for this file type
danielramos_music/homepage/__pycache__/models.cpython-311.pyc
View file @
85dc1812
No preview for this file type
danielramos_music/homepage/admin.py
View file @
85dc1812
...
...
@@ -12,13 +12,13 @@ class AlbumAdmin(admin.ModelAdmin):
model
=
Album
list_display
=
(
'album_name'
,
'description'
,
'release_date'
,
'label'
,
'song_count'
)
search_fields
=
(
'album_name'
,
'description'
,
'label'
)
list_filter
=
(
'album_name'
)
list_filter
=
(
'album_name'
,
)
class
SongAdmin
(
admin
.
ModelAdmin
):
model
=
Song
list_display
=
(
'song_title'
,
'song_length'
,
'lyrics'
,
'music_video'
)
search_fields
=
(
'song_title'
,
'lyrics'
)
list_filter
=
(
'song_title'
)
list_filter
=
(
'song_title'
,
)
admin
.
site
.
register
(
Artist
,
ArtistAdmin
)
...
...
danielramos_music/homepage/models.py
View file @
85dc1812
...
...
@@ -5,20 +5,20 @@ class Artist(models.Model):
artist_name
=
models
.
CharField
(
max_length
=
50
,
unique
=
True
)
monthly_listeners
=
models
.
IntegerField
()
birth_name
=
models
.
CharField
(
max_length
=
50
,
blank
=
True
)
bio
=
models
.
CharField
(
max_length
=
700
,
blank
=
True
)
bio
=
models
.
TextField
(
blank
=
True
)
class
Album
(
models
.
Model
):
album_name
=
models
.
CharField
(
max_length
=
50
)
artist
=
models
.
CharField
(
max_length
=
50
)
description
=
models
.
CharField
(
max_length
=
150
,
unique
=
True
)
description
=
models
.
TextField
(
unique
=
True
)
release_date
=
models
.
CharField
(
max_length
=
50
)
label
=
models
.
CharField
(
max_length
=
50
,
blank
=
True
)
song_count
=
models
.
IntegerField
(
default
=
'1'
)
class
Song
(
models
.
Model
):
song_title
=
models
.
CharField
(
max_length
=
5
0
)
song_title
=
models
.
CharField
(
max_length
=
10
0
)
artist
=
models
.
CharField
(
max_length
=
50
)
album
=
models
.
CharField
(
max_length
=
150
)
song_length
=
models
.
IntegerField
(
verbose_name
=
"SONG LENGTH (in secs.)"
)
...
...
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