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后,已生成此错误。
答案 0 :(得分:1)
这是django 2.2中的新升级,您需要更新操作,https://docs.djangoproject.com/en/2.2/releases/2.2/#admin-actions-are-no-longer-collected-from-base-modeladmin-classes 这是有关导致此错误的更改的发行说明。
答案 1 :(得分:0)
这似乎在 Django 2.2 中被破坏了。
Ticket 29917 对此进行了讨论(意见不一),虽然它被标记为已修复,但问题仍然存在。
我的观察表明,实际功能代码中没有任何问题(操作确实有效,并且不会在继承的 ModelAdmin 类上收集两次)。只是那个嘈杂的警告试图变得过于聪明。
您可以通过将其添加到您的设置中来简单地禁用它:
SILENCED_SYSTEM_CHECKS = ['admin.E130']