improve admin (filter by hidden, show hidden)

This commit is contained in:
Tomáš Mládek 2020-03-20 16:37:26 +01:00
parent 3cea57950b
commit e95c3f81f5

View file

@ -32,9 +32,9 @@ class DocumentExternalListFilter(admin.SimpleListFilter):
class DocumentAdmin(admin.ModelAdmin): class DocumentAdmin(admin.ModelAdmin):
exclude = ('is_removed',) exclude = ('is_removed',)
list_filter = ('tags', DocumentExternalListFilter) list_display = ('title', 'author', 'published', 'hidden', 'filed_under')
list_filter = ('tags', 'hidden', DocumentExternalListFilter)
search_fields = ('title', 'author', 'published') search_fields = ('title', 'author', 'published')
list_display = ('title', 'author', 'published', 'filed_under')
@staticmethod @staticmethod
def filed_under(document: Document): def filed_under(document: Document):