Hide borrowable section

This commit is contained in:
Yohann D'ANELLO 2021-10-26 15:07:29 +02:00
parent d0805ebe8a
commit 1e6e033cdd
Signed by: ynerant
GPG Key ID: 3A75C55819C8CF85
1 changed files with 5 additions and 1 deletions

View File

@ -23,7 +23,11 @@ class AuthorAdmin(VersionAdmin):
class BorrowableAdmin(PolymorphicParentModelAdmin):
search_fields = ('title',)
child_models = (CD, Comic, Manga, Novel, Review, Vinyl,)
show_in_index = False
def get_model_perms(self, request):
# We don't want that the borrowable items appear directly in
# main menu, but we still want search borrowable items.
return {}
class MediumAdmin(VersionAdmin, PolymorphicChildModelAdmin):