@@ -0,0 +1,714 @@
+import itertools%0A%0Afrom django import template%0A%0A%0Aregister = template.Library()%0A%0A%0APATHS = %5B%0A    '_meta', # model%0A    'queryset.model._meta',%0A    'instance._meta',%0A    'model._meta',%0A%5D%0A%0Adef _resolve(instance, last_part):%0A    for path in PATHS:%0A        o = instance%0A        found = True%0A        for part in itertools.chain(path.split('.'), %5Blast_part%5D):%0A            try:%0A                o = getattr(o, part)%0A            except AttributeError:%0A                found = False%0A                break%0A%0A        if found:%0A            return o%0A%0A%0A@register.filter%0Adef verbose_name(item):%0A    return _resolve(item, 'verbose_name')%0A%0A@register.filter%0Adef verbose_name_plural(item):%0A    return _resolve(item, 'verbose_name_plural')%0A

Add helpers to determine verbose_name(_plural)? of arbitrary objects