Django - django-reversion - 在继承中不起作用
我创建了一个公共类,它的管理类应该由我的所有模型继承。我的公共管理类继承了 VersionAdmin
from reversion.admin import VersionAdmin
class CommonAdmin(VersionAdmin):
pass
问题是,继承 CommonAdmin 的模型管理员没有在“恢复项目”中显示已删除的模型条目。但如果我不使用继承,它就可以正常工作。
I have created a common class with it's admin class which should be inherited by all of my models. My common admin class inherited the VersionAdmin
from reversion.admin import VersionAdmin
class CommonAdmin(VersionAdmin):
pass
The problem is that, the model admins which inherited CommonAdmin is not showing the deleted model entries in "Recover Items". But If I didn't use inheritance, it works fine.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
以下未正常运行。现在效果很好。
The following didn't run properly. It works fine now.