ERRORS:
<class 'astromatchapp.report.admin.user.ReportUserAdmin'>: (admin.E130) __name__ attributes of actions defined in <class 'astromatchapp.report.admin.user.ReportUserAdmin'> must be unique.
<class 'astromatchapp.web.admin.user.UserAdmin'>: (admin.E130) __name__ attributes of actions defined in <class 'astromatchapp.web.admin.user.UserAdmin'> must be unique.
?: (urls.E007) The custom handler404 view 'astromatchapp.web.views.http_error.handler404' does not take the correct number of arguments (request, exception).
迁移到我的 manage.py 后生成了这个错误。
最佳答案
这似乎在 Django 2.2 中被破坏了。
Ticket 29917讨论了这个(意见不一),虽然它被标记为已修复,但问题仍然存在。
我的观察表明,实际功能代码中没有任何问题(操作确实有效,并且不会在继承的 ModelAdmin 类上收集两次)。只是试图太聪明的嘈杂警告。
您可以通过将其添加到您的设置中来简单地禁用它:
SILENCED_SYSTEM_CHECKS = ['admin.E130']
关于django - <class 'astromatchapp.report.admin.user.ReportUserAdmin'> 中定义的 Action 的 __name__ 属性必须是唯一的,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/58502493/