Hide borrowable section
This commit is contained in:
parent
d0805ebe8a
commit
1e6e033cdd
|
@ -23,7 +23,11 @@ class AuthorAdmin(VersionAdmin):
|
||||||
class BorrowableAdmin(PolymorphicParentModelAdmin):
|
class BorrowableAdmin(PolymorphicParentModelAdmin):
|
||||||
search_fields = ('title',)
|
search_fields = ('title',)
|
||||||
child_models = (CD, Comic, Manga, Novel, Review, Vinyl,)
|
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):
|
class MediumAdmin(VersionAdmin, PolymorphicChildModelAdmin):
|
||||||
|
|
Loading…
Reference in New Issue