英文:
How to add custom left-link models to wagtail admin page
问题
我一直在尝试向Wagtail管理界面侧边栏添加一个左侧链接,以便为管理员提供更简单的体验。我的最终目标是添加一个自定义对象的集合(已经创建),可以从Wagtail的管理界面的侧边栏进行编辑,并在站点的主页上显示该集合。
我是Python/Django的新手,特别是Wagtail方面,但我在官方文档中没有找到有关此的帮助。是否有一种简单的方法来实现这个?或者您必须编辑Wagtail源代码?
非常感谢您的帮助。
英文:
I've been trying to add a left-link to the wagtail administration interface sidebar so that I can provide an easier experience to moderators.
My ultimate goal is to add a collection of custom objects (already made), editable from the sidebar from wagtail's admin interface, and displaying that collection on the site's home page.
Wagtail left links example (taken from official documentation)
I'm new to python/Django and especially new in Wagtail, but I didn't find any help with this on official documentation. Is there an easy way to do this? Or you have to edit Wagtail source code?
Thanks a lot in advance
答案1
得分: 3
Wagtail的modeladmin模块允许您为任意Django模型设置编辑界面,通过管理菜单访问。或者,对于更低级别的控制,您可以通过register_admin_menu_item
挂钩添加菜单项。
英文:
Wagtail's modeladmin module allows you to set up editing interfaces for arbitrary Django models, available through the admin menu. Alternatively, for lower-level control, you can add menu items through the register_admin_menu_item
hook.
通过集体智慧和协作来改善编程学习和解决问题的方式。致力于成为全球开发者共同参与的知识库,让每个人都能够通过互相帮助和分享经验来进步。
评论