Can you change a field label in the Django Admin application?

前端 未结 5 957
甜味超标
甜味超标 2020-12-30 18:28

As the title suggests. I want to be able to change the label of a single field in the admin application. I\'m aware of the Form.field attribute, but how do I get my Model or

5条回答
  •  盖世英雄少女心
    2020-12-30 19:17

    Building on Javier's answer; if you need one label in forms (on the front-end) and another label on admin it is best to set internal (admin) one in the model and overwrite it on forms. Admin will of course use the label in the model field automatically.

提交回复
热议问题