calibre-web-companion/CalibreWebCompanion/library/admin.py

27 lines
727 B
Python
Raw Permalink Normal View History

2020-07-08 02:11:21 +00:00
from django.contrib import admin
from .models import Author, Book, Language, Publisher, Series, Tag
2020-07-08 02:11:21 +00:00
# Register your models here.
@admin.register(Author)
2020-07-08 02:11:21 +00:00
class AuthorAdmin(admin.ModelAdmin):
list_display = (["name"])
@admin.register(Language)
2020-07-08 02:11:21 +00:00
class LanguageAdmin(admin.ModelAdmin):
list_display = (["id", "lang_code"])
@admin.register(Publisher)
2020-07-08 02:11:21 +00:00
class PublisherAdmin(admin.ModelAdmin):
list_display = (["id","name"])
@admin.register(Series)
class SeriesAdmin(admin.ModelAdmin):
list_display = (["id","name"])
@admin.register(Tag)
2020-07-08 02:11:21 +00:00
class TagAdmin(admin.ModelAdmin):
list_display = (["id","name"])
@admin.register(Book)
2020-07-08 02:11:21 +00:00
class BookAdmin(admin.ModelAdmin):
list_display = (["id","title", "author_sort"])