Commit 08bb0e50 authored by Mavrick Jordan Lee's avatar Mavrick Jordan Lee

Added Admin Panel in Homepage App

parent 02f1ef5e
No preview for this file type
from django.contrib import admin from django.contrib import admin
from .models import Artist, Album, Song
# Register your models here. # Register your models here.
class ArtistAdmin(admin_ModelAdmin):
model = Artist
list_display = ('artist name', 'birth name', 'monthly listeners')
search_fields = ('artist name', 'birth name')
list_filter = ('artist name', 'birth name')
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')
class SongAdmin(admin_ModelAdmin):
model = Song
list_display = ('song title', 'song length', 'lyrics', 'music video flag')
search_fields = ('song title', 'lyrics')
list_filter = ('song title')
admin.site.register(Artist)
admin.site.register(Album)
admin.site.register(Song)
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment