Commit 2d9cccfa authored by Jan Enzo Salvador's avatar Jan Enzo Salvador

Edited admin file in bookshelf app

parent fae20799
from django.contrib import admin from django.contrib import admin
from .models import Author, Books
# Register your models here. # Register your models here.
class AuthorAdmin(admin.ModelAdmin):
model = Author
list_display = ('first_name', 'last_name', 'age', 'nationality', 'bio')
search_display = ('last_name',)
list_filter = ('last_name',)
class BooksAdmin(admin.ModelAdmin):
model = Books
list_display = ('title', 'author', 'publisher', 'year_published', 'ISBN')
search_display = ('title', 'author', 'publisher', 'year_published', 'ISBN')
list_filter = ('title',)
admin.site.register(Author, AuthorAdmin)
admin.site.register(Books, BooksAdmin)
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