<commit_before>from django import template
from django.template.loader import render_to_string

register = template.Library()


@register.simple_tag(takes_context=True, name='uncaptcha')
def uncaptcha(context, form=None):
    """
    Renders the uncaptcha field for a form.
    """
    if form is None:
        field = context['form']['uncaptcha']
    else:
        field = form['uncaptcha']

    context['field'] = field

    rendered_uncaptcha = render_to_string('forms/fields/uncaptcha.html', context)
    context.pop()
    return rendered_uncaptcha<commit_msg>changed how uncaptcha tag renders so that it produces more useful errors<commit_after>from django import template
from django.template.loader import render_to_string

register = template.Library()


@register.simple_tag(takes_context=True, name='uncaptcha')
def uncaptcha(context, form=None):
    """
    Renders the uncaptcha field for a form.
    """
    if form:
        field = form['uncaptcha']
    else:
        field = context['form']['uncaptcha']

    context['field'] = field

    rendered_uncaptcha = render_to_string('forms/fields/uncaptcha.html', context)
    context.pop()
    return rendered_uncaptcha
{'fraction_non_alphanumeric': 0.10687022900763359, 'fraction_numerical': 0.0, 'mean_word_length': 4.086206896551724, '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': '2965353', 'n_tokens_mistral': 353, 'n_tokens_neox': 345, 'n_words': 86}