edited search fields to search for authors by first name or last name only

parent e6e2837b
...@@ -6,7 +6,7 @@ from .models import Author, Book ...@@ -6,7 +6,7 @@ from .models import Author, Book
class AuthorAdmin(admin.ModelAdmin): class AuthorAdmin(admin.ModelAdmin):
model = Author model = Author
list_display = ("first_name", "last_name", "age", "nationality", "bio",) list_display = ("first_name", "last_name", "age", "nationality", "bio",)
search_fields = ("first_name", "last_name", "age", "nationality", "bio",) search_fields = ("first_name", "last_name",)
#admin panel for Book model #admin panel for Book model
......
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