Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
M
mymusiclist
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
1
Issues
1
List
Board
Labels
Milestones
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Open sidebar
Brian Guadalupe
mymusiclist
Commits
64829ae8
Commit
64829ae8
authored
Nov 03, 2017
by
Brian Guadalupe
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Enable admin page to view tables more easily
parent
dc1e07e2
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
14 additions
and
0 deletions
+14
-0
admin.py
core/admin.py
+14
-0
No files found.
core/admin.py
View file @
64829ae8
from
django.contrib
import
admin
from
core.models
import
*
# Register your models here.
class
AlbumAdmin
(
admin
.
ModelAdmin
):
list_display
=
(
'album_name'
,
'artist'
,
'year'
)
class
ArtistAdmin
(
admin
.
ModelAdmin
):
list_display
=
(
'name'
,)
class
SongAdmin
(
admin
.
ModelAdmin
):
list_display
=
(
'song_name'
,
'artist'
,
'album'
)
list_filter
=
(
'artist'
,
'album'
,)
admin
.
site
.
register
(
Album
,
AlbumAdmin
)
admin
.
site
.
register
(
Artist
,
ArtistAdmin
)
admin
.
site
.
register
(
Song
,
SongAdmin
)
\ 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