from django import template

register = template.Library()


@register.simple_tag
def genderize(staff, male_variant, female_variant):
    if getattr(staff, 'gender', 'M') == 'F':
        return female_variant
    else:
        return male_variant
