有没有办法在页面派生模型中放置搜索字段和列表过滤器,而无需自定义ModelAdmin?我想使用页面派生模型的默认管理页面。
models.py
class FolderPage(Page):
body = StreamField([
('paragraph', blocks.RichTextBlock()),
('embedded_video', EmbedBlock(icon='media')),
('table', TableBlock()),
], null=True, blank=True, verbose_name=u'Corpo da Notícia')
search_fields = Page.search_fields + [
index.SearchField('body'),
index.SearchField('title'),
index.FilterField('live'),
]