Tuesday, August 4, 2015

Re: Accessing a field's verbose_name

Thanks for your answer, Mike.

However, I have just tried it and it doesn't seem to work for me either...

Your code :
self.__class__()._meta.get_field('{0}'.format(field_name)).verbose_name
gives the exact same result as
self._meta.get_field(field_name).verbose_name

--
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 django-users+unsubscribe@googlegroups.com.
To post to this group, send email to django-users@googlegroups.com.
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/6dff456a-6327-4b7c-a78c-47f36872b0d5%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

No comments:

Post a Comment