diff --git a/horilla_views/templatetags/generic_template_filters.py b/horilla_views/templatetags/generic_template_filters.py index 25d18c17e..11bb11719 100644 --- a/horilla_views/templatetags/generic_template_filters.py +++ b/horilla_views/templatetags/generic_template_filters.py @@ -102,7 +102,15 @@ def format(string: str, instance: object): attr_name: str = attr_placeholder attrs = attr_name.split("__") for attr in attrs: - value = getattr(instance, attr, "") + if ( + attr.startswith("get_") + and attr.endswith("_display") + and callable(getattr(instance, attr, None)) + ): # 874 + value = getattr(instance, attr)() + else: + value = getattr(instance, attr, "") + if isinstance(value, types.MethodType): value = value() instance = value