追加インラインモデルを追加し、Django管理者のUser changeフォームからいくつかのフィールドを除外します。DjangoでUser adminを適切に上書きする方法
Iは、内蔵のUserAdmin
ユーザー変更デザインを維持するために、Djangoの上書きしようとしています:
class UserCustomAdmin(UserAdmin):
# list_display = ['id', 'username','email', 'last_login']
exclude = ['groups','user_permissions']
inlines = [UserProfileInline]
でもexclude = ['groups']
にエラーが発生:
u"Key 'groups' not found in 'UserForm'. Choices are: date_joined, email, first_name, is_active, is_staff, is_superuser, last_login, last_name, password, username."
それを動作させるためにどのように?