django-fluent-comments 模型未出现在 Wagtail ModelAdmin 中



我有一个使用django-fluent-comments的wagtail项目,我希望能够在管理页面中调节注释。基于本教程,我将其添加到我的wagtail_hooks.py文件中:

class CommentAdmin(ModelAdmin):
    model = FluentComment
    menu_label = 'Comments'
    menu_icon = 'list-ul'
    menu_order = 200
    add_to_settings_menu = False
    list_display = ('user', 'comment')
modeladmin_register(CommentAdmin)

但是,当我进入管理页面时,没有评论选项卡,也没有显示错误。我试图在管理页面上添加一个页面模型,并且效果很好。

FluentComment模型仅:

class FluentComment(Comment):
    """
    Proxy model to make sure that a ``select_related()`` is performed on the ``user`` field.
    """
    objects = FluentCommentManager()
    class Meta:
        proxy = True

(在此文件中(,所以我想知道我是否有正确的模型。但是,如果我将print model.objects.all()添加到我的CommentAdmin类中,则在日志中显示我的所有注释。

FluentComment更改为 django_comments.models.CommentFluentComment是Wagtail的ModelAdmin不喜欢的代理模型。

最新更新