Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我想将自定义管理操作构建到Django 定义的模型中。假设我想django.contrib.auth.models.User在 Django 管理界面中添加“激活选定用户”操作。什么是干净和正确的方法来完成这个?
django.contrib.auth.models.User
我查看了文档,但如果我没看错的话,它只是关于在自定义模型中实现管理操作。
admin.site.unregister(User) admin.site.register(User, YourUserAdmin)