<commit_before>from django import template

from famille import data


register = template.Library()


BADGE_FOLDER = "img/badges/%s.png"
FLAG_FOLDER = "img/flag/%s.png"


@register.filter(name='badge_icon')
def get_badge_icon(user, name):
    """
    Retrieve the badge icon url according to the value
    of the parameter (True or False).

    :param user:     the user<commit_msg>tryin to fixe url for flag<commit_after>from django import template

from famille import data


register = template.Library()


BADGE_FOLDER = "img/badges/%s.png"
FLAG_FOLDER = "static/img/flag/%s.png"


@register.filter(name='badge_icon')
def get_badge_icon(user, name):
    """
    Retrieve the badge icon url according to the value
    of the parameter (True or False).

    :param user:     the user
{'fraction_non_alphanumeric': 0.10305343511450382, 'fraction_numerical': 0.0, 'mean_word_length': 3.888198757763975, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '1182643', 'n_tokens_mistral': 264, 'n_tokens_neox': 255, 'n_words': 78}