简体   繁体   English

Django-Django还原-在继承中不起作用

[英]Django - django-reversion - not working in inheritance

I have created a common class with it's admin class which should be inherited by all of my models. 我用它的admin类创建了一个公共类,该类应该由我的所有模型继承。 My common admin class inherited the VersionAdmin 我的普通管理类继承了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". 问题是,继承了CommonAdmin的模型管理员未在“恢复项目”中显示已删除的模型条目。 But If I didn't use inheritance, it works fine. 但是,如果我不使用继承,它就可以正常工作。

The following didn't run properly. 以下未正常运行。 It works fine now. 现在工作正常。

manage.py createinitialrevisions

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM