1 from django.contrib import admin
3 from .wikidata import WikidataAdminMixin
6 class AuthorAdmin(WikidataAdminMixin, admin.ModelAdmin):
7 list_display = "first_name", "last_name", "notes"
8 search_fields = ["first_name", "last_name", "wikidata"]
9 prepopulated_fields = {"slug": ("first_name", "last_name")}
12 admin.site.register(models.Author, AuthorAdmin)
15 class BookAdmin(WikidataAdminMixin, admin.ModelAdmin):
16 list_display = "title", "notes"
17 autocomplete_fields = ["authors", "translators"]
18 prepopulated_fields = {"slug": ("title",)}
21 admin.site.register(models.Book, BookAdmin)