created admin panel for Author model

parent 3752cdd7
from django.contrib import admin from django.contrib import admin
from .models import Author, Book
#admin panel for Author model
class AuthorAdmin(admin.ModelAdmin):
model = Author
list_display = ("first_name", "last_name", "age", "nationality", "bio",)
search_fields = ("first_name", "last_name", "age", "nationality", "bio",)
admin.site.register(Author, AuthorAdmin)
# Register your models here.
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