<commit_before>{% load mezzanine_tags i18n %}

{% with form_for_fields.non_field_errors as non_field_errors %}
{% if non_field_errors or form_for_fields.errors %}
<div class="form-errors">
    {% for error in non_field_errors %}
    <div class="alert alert-danger non-field-error">{{ error }}</div>
    {% empty %}
    <div class="alert alert-danger field-error">{% trans "Please correct the errors below." %}</div>
    {% endfor %}
</div>
{% endif %}
{% endwith %}

{% nevercache %}
<input type="hidden" name="referrer" value="{{ request.META.HTTP_REFERER }}">
{% csrf_token %}
{% endnevercache %}

{% for field in form_for_fields %}
{% if field.is_hidden %}
{{ field }}
{% else %}
<div class="form-group input_{{ field.id_for_label }} {{ field.field.type }}
    {% if field.errors %} has-error{% endif %}">
    <label class="control-label" for="{{ field.auto_id }}">{{ field.label }}</label>
    {{ field }}
    {% if field.errors %}
    <p class="help-block">
        {% for e in field.errors %}
        {% if not forloop.first %} / {% endif %}{{ e }}
        {% endfor %}
    </p>
    {% else %}
    <p class="help-block">{{ field.help_text }}</p>
    {% endif %}
</div>
{% endif %}
{% endfor %}<commit_msg>Don't output field help block if a field doesn't define help text.<commit_after>{% load mezzanine_tags i18n %}

{% with form_for_fields.non_field_errors as non_field_errors %}
{% if non_field_errors or form_for_fields.errors %}
<div class="form-errors">
    {% for error in non_field_errors %}
    <div class="alert alert-danger non-field-error">{{ error }}</div>
    {% empty %}
    <div class="alert alert-danger field-error">{% trans "Please correct the errors below." %}</div>
    {% endfor %}
</div>
{% endif %}
{% endwith %}

{% nevercache %}
<input type="hidden" name="referrer" value="{{ request.META.HTTP_REFERER }}">
{% csrf_token %}
{% endnevercache %}

{% for field in form_for_fields %}
{% if field.is_hidden %}
{{ field }}
{% else %}
<div class="form-group input_{{ field.id_for_label }} {{ field.field.type }}
    {% if field.errors %} has-error{% endif %}">
    <label class="control-label" for="{{ field.auto_id }}">{{ field.label }}</label>
    {{ field }}
    {% if field.errors %}
    <p class="help-block">
        {% for e in field.errors %}
        {% if not forloop.first %} / {% endif %}{{ e }}
        {% endfor %}
    </p>
    {% elif field.help_text %}
    <p class="help-block">{{ field.help_text }}</p>
    {% endif %}
</div>
{% endif %}
{% endfor %}
{'fraction_non_alphanumeric': 0.19991971095945404, 'fraction_numerical': 0.0016057808109193096, 'mean_word_length': 3.4579606440071555, 'pattern_counts': {'":': 0, '<': 33, '<?xml version=': 0, '>': 33, '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': '4246781', 'n_tokens_mistral': 935, 'n_tokens_neox': 818, 'n_words': 204}