created admin panel for Book model

parent 689d91ce
......@@ -8,9 +8,15 @@ class AuthorAdmin(admin.ModelAdmin):
list_display = ("first_name", "last_name", "age", "nationality", "bio",)
search_fields = ("first_name", "last_name", "age", "nationality", "bio",)
#admin panel for Book model
class BookAdmin(admin.ModelAdmin):
model = Book
list_display = ("title", "author", "publisher", "year_published", "ISBN", "blurb",)
admin.site.register(Author, AuthorAdmin)
admin.site.register(Book, BookAdmin)
......
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