Django:如何更改管理站点中模型字段的显示

时间:2020-05-25 11:48:57

标签: django

我希望标题足以知道我的问题。

我的模型中有此代码

Courses = models.ForeignKey(Course,  on_delete=models.CASCADE, null=True, blank=True)

这就是管理网站中的样子

enter image description here

如何在不更改模型中的字段名称的情况下,将管理站点中的显示字段名称 Course 更改为 Track

1 个答案:

答案 0 :(得分:1)

@ContentChildren('templateRef1, templateRef2') allTypesOfButtons: QueryList<ButtonActionComponent | ButtonNavigationComponent>;
相关问题