问题标签 [django-moderation]

For questions regarding programming in ECMAScript (JavaScript/JS) and its various dialects/implementations (excluding ActionScript). Note JavaScript is NOT the same as Java! Please include all relevant tags on your question; e.g., [node.js], [jquery], [json], [reactjs], [angular], [ember.js], [vue.js], [typescript], [svelte], etc.

0 投票
1 回答
94 浏览

django - 带有自定义模型管理器的 django-moderation

我正在使用 Django 3.2 和django-moderation

我想调节 Foo:

当我运行时python manage.py makemigrations,我收到错误:

AttributeError:类型对象“Foo”没有属性“unmoderated_published”

我试图通过添加字段并为主持对象创建管理器来解决这个问题 - 但尽管这消除了错误,但对象不再被主持。

我可以让创建的对象进行审核的唯一方法是删除所有模型管理器 - 默认objects管理器除外。

如何让 django-moderation 与自定义模型管理器一起使用模型?

当我尝试从MPTT派生 Foo 时遇到同样的错误- 即使不使用自定义模型管理器。

AttributeError:类型对象 'Foo' 没有属性 'unmoderated__tree_manager'