<commit_before>{% extends '_base.html' %}
{% load form_helpers %}

{% block content %}
    <form action="" method="post" enctype="multipart/form-data" class="form form-horizontal">
        {% csrf_token %}
        {% for field in form.hidden_fields %}
            {{ field }}
        {% endfor %}
        <div class="row">
            <div class="col-md-6 col-md-offset-3">
                <h3>{% block title %}{% if obj.pk %}Editing {{ obj_type }} {{ obj }}{% else %}Add a new {{ obj_type }}{% endif %}{% endblock %}</h3>
                {% block tabs %}{% endblock %}
                {% if form.non_field_errors %}
                    <div class="panel panel-danger">
                        <div class="panel-heading"><strong>Errors</strong></div>
                        <div class="panel-body">
                            {{ form.non_field_errors }}
                        </div>
                    </div>
                {% endif %}
                {% block form %}
                    <div class="panel panel-default">
                        <div class="panel-heading"><strong>{{ obj_type|capfirst }}</strong></div>
                        <div class="panel-body">
                            {% render_form form %}
                        </div>
                    </div>
                {% endblock %}
            </div>
        </div>
        <div class="row">
            <div class="col-md-6 col-md-offset-3 text-right">
                {% block buttons %}
                    {% if obj.pk %}
                        <button type="submit" name="_update" class="btn btn-primary">Update</button>
                    {% else %}
                        <button type="submit" name="_create" class="btn btn-primary">Create</button>
                        <button type="submit" name="_addanother" class="btn btn-primary">Create and Add Another</button>
                    {% endif %}
                    <a href="{{ return_url }}" class="btn btn-default">Cancel</a>
                {% endblock %}
            </div>
        </div>
    </form>
{% endblock %}<commit_msg>Add model doc modal to object add/edit template<commit_after>{% extends '_base.html' %}
{% load form_helpers %}
{% load helpers %}

{% block content %}
    <form action="" method="post" enctype="multipart/form-data" class="form form-horizontal">
        {% csrf_token %}
        {% for field in form.hidden_fields %}
            {{ field }}
        {% endfor %}
        <div class="row">
            <div class="col-md-6 col-md-offset-3">
                <h3>
                    <div class="pull-right">
                        <button type="button" class="btn btn-primary btn-xs" data-toggle="modal" data-target="#docs_modal"><i class="fa fa-question"></i></button>
                    </div>
                    {% block title %}{% if obj.pk %}Editing {{ obj_type }} {{ obj }}{% else %}Add a new {{ obj_type }}{% endif %}{% endblock %}
                </h3>
                {% block tabs %}{% endblock %}
                {% if form.non_field_errors %}
                    <div class="panel panel-danger">
                        <div class="panel-heading"><strong>Errors</strong></div>
                        <div class="panel-body">
                            {{ form.non_field_errors }}
                        </div>
                    </div>
                {% endif %}
                {% block form %}
                    <div class="panel panel-default">
                        <div class="panel-heading"><strong>{{ obj_type|capfirst }}</strong></div>
                        <div class="panel-body">
                            {% render_form form %}
                        </div>
                    </div>
                {% endblock %}
            </div>
        </div>
        <div class="row">
            <div class="col-md-6 col-md-offset-3 text-right">
                {% block buttons %}
                    {% if obj.pk %}
                        <button type="submit" name="_update" class="btn btn-primary">Update</button>
                    {% else %}
                        <button type="submit" name="_create" class="btn btn-primary">Create</button>
                        <button type="submit" name="_addanother" class="btn btn-primary">Create and Add Another</button>
                    {% endif %}
                    <a href="{{ return_url }}" class="btn btn-default">Cancel</a>
                {% endblock %}
            </div>
        </div>
    </form>
    {% include 'inc/modal.html' with name='docs' title='Documentation' content=obj|get_docs %}
{% endblock %}
{'fraction_non_alphanumeric': 0.15513855553131137, 'fraction_numerical': 0.0026183722452542005, 'mean_word_length': 1.360453141091658, 'pattern_counts': {'":': 0, '<': 81, '<?xml version=': 0, '>': 81, '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': '3856673', 'n_tokens_mistral': 1291, 'n_tokens_neox': 1143, 'n_words': 257}