我使用 admin.tabularinline 在我的 django 管理员中自定义了我的添加用户表单。因此,每当管理员添加用户时,有关User模型和UserProfile模型的信息都会同时保存。但是,UserProfile 表单的标签标记为“Staff Profiles”(带有“s”)。而且它看起来不太好,因为一个用户只有一个配置文件。任何想法如何将“员工档案”更改为“员工档案”?请参阅图片以供参考:
1 回答
1
如docs中所述,更改您的verbose_name_pluralinUserProfileInline
在管理员声明中,添加
class UserProfileInline(admin.YourInlineChoice):
verbose_name_plural="Staff Profile"
[Your params]
于 2019-08-23T05:37:35.460 回答
