<commit_before>from django import template
from django.conf import settings
from django.utils.six.moves.urllib.parse import urljoin


register = template.Library()


@register.simple_tag(takes_context=True)
def boards_web_static(context, path):
    if settings.ENVIRONMENT != 'DEVELOPMENT':
        request = context['request']

        boards_web_client_version = settings.BOARDS_WEB_CLIENT_VERSION
        client_version = request.QUERY_PARAMS.get(
            'clientVersion', boards_web_client_version)

        path = '/{}/{}'.format(client_version)

    return urljoin(settings.BOARDS_WEB_STATIC_URL, path)
<commit_msg>Fix boards_web_static template tag in other envs<commit_after>from django import template
from django.conf import settings
from django.utils.six.moves.urllib.parse import urljoin


register = template.Library()


@register.simple_tag(takes_context=True)
def boards_web_static(context, path):
    if settings.ENVIRONMENT != 'DEVELOPMENT':
        request = context['request']

        boards_web_client_version = '123'
        client_version = request.GET.get(
            'clientVersion', boards_web_client_version)

        path = '/{}/{}'.format(client_version, path)

    return urljoin(settings.BOARDS_WEB_STATIC_URL, path)

{'fraction_non_alphanumeric': 0.09577015163607343, 'fraction_numerical': 0.0023942537909018356, 'mean_word_length': 4.291139240506329, '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': '3516396', 'n_tokens_mistral': 391, 'n_tokens_neox': 375, 'n_words': 75}