

def two_state_template(state, ok_icon='fa fa-check', fail_icon='fa fa-times'):
    if state:
        return mark_safe('<i class="text-success {}"></i>'.format(ok_icon))
    else:
        return mark_safe('<i class="text-danger {}"></i>'.format(fail_icon))

dataset/ETHPy150Open mayan-edms/mayan-edms/mayan/apps/common/widgets.py two_state_template/original