I need to display several models name & objects in a template
Here is my view
def contents(request):
\"\"\"Lists contents\"\"\
Tag:
@register.simple_tag
def get_verbose_name(object, fieldnm):
return object._meta.get_field(fieldnm).verbose_name
HTML (year is the name of my field in my model)
Thanks to the reference above. Wanted to share what i found in case others where looking for the same solution i found for my situation.