有没有办法在Wagtail中将自定义标签设置为FieldPanel?我想做点什么:
class BlogPage(Page):
intro = models.CharField(max_length=255)
panels = [
FieldPanel('intro', label = "My custom label")
]
答案 0 :(得分:7)
模型字段接受verbose_name
属性,该属性将被选取用作表单字段标签:
class BlogPage(Page):
intro = models.CharField(max_length=255, verbose_name="My custom label")
panels = [
FieldPanel('intro')
]