1
0
mirror of https://gitlab.crans.org/mediatek/med.git synced 2024-12-25 05:42:24 +00:00

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

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):