Modified list displays

parent 43f1e4cf
...@@ -3,13 +3,13 @@ from .models import Author, Book ...@@ -3,13 +3,13 @@ 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',) list_display = ('first_name', 'last_name', 'age', 'nationality', 'bio', )
search_fields = ('first_name', 'last_name', 'age', 'nationality',) search_fields = ('first_name', 'last_name', 'age', 'nationality',)
list_filter = ['first_name', 'last_name', 'nationality',] list_filter = ['first_name', 'last_name', 'nationality',]
class BooksAdmin(admin.ModelAdmin): class BooksAdmin(admin.ModelAdmin):
model = Book model = Book
list_display = ('title', 'author', 'publisher', 'year_published',) list_display = ('title', 'author', 'publisher', 'year_published', 'ISBN', 'blurb',)
search_fields = ('title', 'author', 'publisher', 'year_published', 'ISBN',) search_fields = ('title', 'author', 'publisher', 'year_published', 'ISBN',)
list_filter = ['title', 'author', 'year_published',] list_filter = ['title', 'author', 'year_published',]
......
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