How access verbose_name of a field in template?
I have an object:
p = Person.objects.get(pk=1)
and I wanna access same verbose_name in template like it:
<span>{{ p.name.__verbose_name }}: {{ p.name }}</span>
<span>{{ p.birth_date.__verbose_name }}: {{ p.birth_date }}</span>
*result:*
Name: Maria
Birth date: 1990-04-07
How I do it? Have some way of access verbose_name? I am using Django 1.8
--
You received this message because you are subscribed to the Google Groups
"Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/django-users.
To view this discussion on the web visit
https://groups.google.com/d/msgid/django-users/a315acfc-569e-42c7-bd2c-fd37e9693715%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.