@register.filter
def get_choice_value(field):
    try:
        return dict(field.field.choices)[field.value()]
    except __HOLE__:
        return ', '.join([entry for id, entry in field.field.choices])
    except KeyError:
        return _('None')
dataset/ETHPy150Open mayan-edms/mayan-edms/mayan/apps/appearance/templatetags/appearance_tags.py/get_choice_value