Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
N
neolithic_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
Neo Emmanuel Ballesteros
neolithic_music
Commits
dc0f0391
Commit
dc0f0391
authored
Feb 21, 2023
by
Neo Emmanuel Ballesteros
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Modified admin list view
parent
b3dc6b39
Changes
7
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
116 additions
and
15 deletions
+116
-15
db.sqlite3
db.sqlite3
+0
-0
admin.cpython-311.pyc
homepage/__pycache__/admin.cpython-311.pyc
+0
-0
models.cpython-311.pyc
homepage/__pycache__/models.cpython-311.pyc
+0
-0
admin.py
homepage/admin.py
+8
-0
0002_album_label_album_song_count_artist_bio_and_more.py
.../0002_album_label_album_song_count_artist_bio_and_more.py
+93
-0
0002_album_label_album_song_count_artist_bio_and_more.cpython-311.pyc
...abel_album_song_count_artist_bio_and_more.cpython-311.pyc
+0
-0
models.py
homepage/models.py
+15
-15
No files found.
db.sqlite3
View file @
dc0f0391
No preview for this file type
homepage/__pycache__/admin.cpython-311.pyc
View file @
dc0f0391
No preview for this file type
homepage/__pycache__/models.cpython-311.pyc
View file @
dc0f0391
No preview for this file type
homepage/admin.py
View file @
dc0f0391
...
...
@@ -12,9 +12,17 @@ class ArtistAdmin(admin.ModelAdmin):
class
AlbumAdmin
(
admin
.
ModelAdmin
):
model
=
Album
search_fields
=
(
'album_name'
,
'artist'
,)
list_display
=
(
'album_name'
,
'artist'
,)
list_filter
=
(
'album_name'
,
'artist'
,)
class
SongAdmin
(
admin
.
ModelAdmin
):
model
=
Song
search_fields
=
(
'album'
,
'artist'
,
'song_title'
,)
list_display
=
(
'album'
,
'artist'
,
'song_title'
,)
list_filter
=
(
'album'
,
'artist'
,
'song_title'
,)
admin
.
site
.
register
(
Artist
,
ArtistAdmin
)
admin
.
site
.
register
(
Album
,
AlbumAdmin
)
admin
.
site
.
register
(
Song
,
SongAdmin
)
\ No newline at end of file
homepage/migrations/0002_album_label_album_song_count_artist_bio_and_more.py
0 → 100644
View file @
dc0f0391
# Generated by Django 4.1.7 on 2023-02-21 14:34
from
django.db
import
migrations
,
models
class
Migration
(
migrations
.
Migration
):
dependencies
=
[
(
'homepage'
,
'0001_initial'
),
]
operations
=
[
migrations
.
AddField
(
model_name
=
'album'
,
name
=
'label'
,
field
=
models
.
CharField
(
blank
=
True
,
max_length
=
200
,
null
=
True
),
),
migrations
.
AddField
(
model_name
=
'album'
,
name
=
'song_count'
,
field
=
models
.
IntegerField
(
blank
=
True
,
null
=
True
),
),
migrations
.
AddField
(
model_name
=
'artist'
,
name
=
'bio'
,
field
=
models
.
TextField
(
blank
=
True
,
max_length
=
700
,
null
=
True
),
),
migrations
.
AddField
(
model_name
=
'artist'
,
name
=
'birth_name'
,
field
=
models
.
TextField
(
blank
=
True
,
null
=
True
),
),
migrations
.
AddField
(
model_name
=
'song'
,
name
=
'lyrics'
,
field
=
models
.
TextField
(
blank
=
True
,
null
=
True
),
),
migrations
.
AddField
(
model_name
=
'song'
,
name
=
'music_video'
,
field
=
models
.
BooleanField
(
default
=
False
),
),
migrations
.
AlterField
(
model_name
=
'album'
,
name
=
'album_name'
,
field
=
models
.
CharField
(
blank
=
True
,
max_length
=
50
,
null
=
True
),
),
migrations
.
AlterField
(
model_name
=
'album'
,
name
=
'artist'
,
field
=
models
.
CharField
(
blank
=
True
,
max_length
=
50
,
null
=
True
),
),
migrations
.
AlterField
(
model_name
=
'album'
,
name
=
'description'
,
field
=
models
.
TextField
(
blank
=
True
,
null
=
True
),
),
migrations
.
AlterField
(
model_name
=
'album'
,
name
=
'release_date'
,
field
=
models
.
CharField
(
blank
=
True
,
max_length
=
20
,
null
=
True
),
),
migrations
.
AlterField
(
model_name
=
'artist'
,
name
=
'artist_name'
,
field
=
models
.
CharField
(
blank
=
True
,
max_length
=
50
,
null
=
True
),
),
migrations
.
AlterField
(
model_name
=
'artist'
,
name
=
'monthly_listeners'
,
field
=
models
.
IntegerField
(
blank
=
True
,
null
=
True
),
),
migrations
.
AlterField
(
model_name
=
'song'
,
name
=
'album'
,
field
=
models
.
CharField
(
blank
=
True
,
max_length
=
50
,
null
=
True
),
),
migrations
.
AlterField
(
model_name
=
'song'
,
name
=
'artist'
,
field
=
models
.
CharField
(
blank
=
True
,
max_length
=
50
,
null
=
True
),
),
migrations
.
AlterField
(
model_name
=
'song'
,
name
=
'song_length'
,
field
=
models
.
IntegerField
(
blank
=
True
,
null
=
True
),
),
migrations
.
AlterField
(
model_name
=
'song'
,
name
=
'song_title'
,
field
=
models
.
CharField
(
blank
=
True
,
max_length
=
50
,
null
=
True
),
),
]
homepage/migrations/__pycache__/0002_album_label_album_song_count_artist_bio_and_more.cpython-311.pyc
0 → 100644
View file @
dc0f0391
File added
homepage/models.py
View file @
dc0f0391
from
django.db
import
models
class
Artist
(
models
.
Model
):
artist_name
=
models
.
CharField
(
max_length
=
50
)
monthly_listeners
=
models
.
IntegerField
()
birth_name
=
models
.
TextField
()
bio
=
models
.
TextField
(
max_length
=
700
)
artist_name
=
models
.
CharField
(
max_length
=
50
,
blank
=
True
,
null
=
True
)
monthly_listeners
=
models
.
IntegerField
(
blank
=
True
,
null
=
True
)
birth_name
=
models
.
TextField
(
blank
=
True
,
null
=
True
)
bio
=
models
.
TextField
(
max_length
=
700
,
blank
=
True
,
null
=
True
)
class
Album
(
models
.
Model
):
album_name
=
models
.
CharField
(
max_length
=
50
)
artist
=
models
.
CharField
(
max_length
=
50
)
description
=
models
.
TextField
()
release_date
=
models
.
CharField
(
max_length
=
20
)
label
=
models
.
CharField
(
max_length
=
50
)
song_count
=
models
.
IntegerField
()
album_name
=
models
.
CharField
(
max_length
=
50
,
blank
=
True
,
null
=
True
)
artist
=
models
.
CharField
(
max_length
=
50
,
blank
=
True
,
null
=
True
)
description
=
models
.
TextField
(
blank
=
True
,
null
=
True
)
release_date
=
models
.
CharField
(
max_length
=
20
,
blank
=
True
,
null
=
True
)
label
=
models
.
CharField
(
max_length
=
200
,
blank
=
True
,
null
=
True
)
song_count
=
models
.
IntegerField
(
blank
=
True
,
null
=
True
)
class
Song
(
models
.
Model
):
song_title
=
models
.
CharField
(
max_length
=
50
)
artist
=
models
.
CharField
(
max_length
=
50
)
album
=
models
.
CharField
(
max_length
=
50
)
song_length
=
models
.
IntegerField
()
song_title
=
models
.
CharField
(
max_length
=
50
,
blank
=
True
,
null
=
True
)
artist
=
models
.
CharField
(
max_length
=
50
,
blank
=
True
,
null
=
True
)
album
=
models
.
CharField
(
max_length
=
50
,
blank
=
True
,
null
=
True
)
song_length
=
models
.
IntegerField
(
blank
=
True
,
null
=
True
)
music_video
=
models
.
BooleanField
(
default
=
False
)
lyrics
=
models
.
TextField
()
\ No newline at end of file
lyrics
=
models
.
TextField
(
blank
=
True
,
null
=
True
)
\ 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