@register.filter(name='getattr')
def get_attribute(obj, arg):
    return getattr(obj, arg, None)
Get attribute from obj
dataset/ETHPy150Open dimagi/commcare-hq/corehq/apps/hqwebapp/templatetags/hq_shared_tags.py/get_attribute