from django import template


#Django template custom math filters
register = template.Library()


def get_avatar_display_name(value):
    filename = str(value)
    filename = filename.split('.')[0].replace('_', ' ')
    display_name = filename.title().lstrip('User')
    return display_name


register.filter('get_avatar_display_name', get_avatar_display_name)
