How can display the label of non-editable fields i

2019-08-19 16:47发布

问题:

I have this field in my model:

created_date = models.DateTimeField(null=True, blank=True,editable=False, verbose_name=_("Something to show... "))

In accordance with this document ,I show the value of this field by:

form.instance.created_date

I see these links: 1,2,3,4 and this docucment of django. But none of them talk about showing the label (Or verbos_name) of non-editable fields in template.

Also I test these possible modes:

1. form.instance.created_date.label_tag
2. form.instance.created_date.label
3. form.instance.created_date.name
4. form.instance.created_date.verbos_name
...

So ,how can I do this? Is it possible to help me?