diff --git a/netbox/utilities/templatetags/helpers.py b/netbox/utilities/templatetags/helpers.py index 7cb2753e7..e2e64ee1e 100644 --- a/netbox/utilities/templatetags/helpers.py +++ b/netbox/utilities/templatetags/helpers.py @@ -46,6 +46,22 @@ def gfm(value): return mark_safe(html) +@register.filter() +def model_name(obj): + """ + Return the name of the model of the given object + """ + return obj._meta.verbose_name + + +@register.filter() +def model_name_plural(obj): + """ + Return the plural name of the model of the given object + """ + return obj._meta.verbose_name_plural + + @register.filter() def contains(value, arg): """