Django form - set label

前端 未结 5 435
旧巷少年郎
旧巷少年郎 2020-12-12 19:19

I have a form that inherits from 2 other forms. In my form, I want to change the label of a field that was defined in one of the parent forms. Does anyone know how this can

5条回答
  •  甜味超标
    2020-12-12 20:01

    It don't work for model inheritance, but you can set the label directly in the model

    email = models.EmailField("E-Mail Address")
    email_confirmation = models.EmailField("Please repeat")
    

提交回复
热议问题