<commit_before>{% extends "base.html" %}

{% block title %}{{ name }}{% endblock %}

{% block metatags %}
    <meta name="description" content="Detailed descriptions, with full methods and attributes of {{ name }} Django class.">
{% endblock %}

{% block extra_js %}
    <script>
        // Activate accordion
        $(function () {
            $(".collapse").collapse();
            // Method collapsing/expanding buttons
            $("#collapse-methods-btn").click(function() {
                CCBV.method_list.collapse();
            });
            $("#expand-methods-btn").click(function() {
                CCBV.method_list.expand();
            });

            function goToAnchor() {
              var anchor = window.location.hash.replace("#", "");
              $(".collapse").collapse('hide');
              if (anchor) {
                $("#" + anchor).collapse('show');
                $('#' + anchor + ' .collapse').collapse('show');
                setTimeout(function(){
                  console.log($('#' + anchor).attr('class'));
                  $('html, body').animate({
                    scrollTop: $('#' + anchor).offset().top - 70
                  }, 0);
                }, 500);
              }
            }

            $(document).ready(function() {
              goToAnchor();

              window.addEventListener("hashchange", function() { goToAnchor(); });

            });
        });
    </script>
    <script src="/static/ccbv.js"></script>
{% endblock %}


{% block page_header %}
    <h1><small>class</small>&nbsp;{{ this_klass_name }}</h1>
    <pre>from django.forms import {{ this_klass_name }}</pre>
    <div class="pull-right">
        {% if get_doc_link(this_klass) %}
            <a class="btn btn-small btn-info" href="{{ get_doc_link(this_klass) }}" target="_blank">Documentation</a>
        {% else %}
            <span class="btn btn-small btn-info disabled">Documentation</span>
        {% endif %}
        <a class="btn btn-small btn-info" href="{{ get_src_link(this_klass) }}" target="_blank">Source code</a>
    </div>
    {% if this_klass.__doc__ %}
        <pre class="docstring">{{ this_klass.__doc__ }}</pre>
    {% endif %}
{% endblock %}


{% block content %}
    <div class="span12">

        <!-- ANCESTORS -->
        <div class="row">
            {% for ancestor in ancestors %}
                {% if loop.first %}
                    <div class="span4">
                    <h2>Ancestors (<abbr title="Method Resolution Order">MRO</abbr>)</h2>
                    <ol start='0' id="ancestors">
                        <li><strong>{{ this_klass_name }}</strong></li>
                {% else %}
                        <li>
                            <a href="{{ get_klass_url(ancestor) }}" class="{% if ancestor in direct_ancestors %}direct{% endif %}">
                                {{ ancestor.__name__ }}
                            </a>
                        </li>
                {% endif %}
                {% if loop.last %}</ol></div>{% endif %}
            {% endfor %}
        </div>

        <!-- DESCENDANTS -->
        <div class="row">
            {% for descendant in descendants %}
                {% if loop.first %}
                    <div class="span4" id="descendants">
                    <h2>Descendants</h2>
                    <ul class="unstyled">
                    {% endif %}
                        <li><a href="{{ get_klass_url(descendant) }}">{{ descendant.__name__ }}</a></li>
                    {% if loop.last %}</ul></div>{% endif %}
            {% endfor %}
        </div>

        <!-- ATTRIBUTES -->
        <div class="row">
            {% for attribute in attributes %}
                {% if loop.first %}
                    <div class="span12">
                        <h2>Attributes</h2>
                        <table class="table table-striped table-bordered table-condensed">
                            <thead>
                                <tr>
                                    <th>&nbsp;</th>
                                    <th>Defined in</th>
                                </tr>
                            </thead>
                            <tbody>
                {% endif %}
                            <tr>
                                <td>
                                    <code class="attribute{%if attribute.overridden %} overridden{% endif %}">
                                        <strong>{{ attribute.name }}</strong> = {{ attribute.value|e }}
                                    </code>
                                </td>
                                <td style="min-width:100px">
                                    {% if attribute.classobject == this_klass %}
                                        {{ this_klass_name }}
                                    {% else %}
                                        <a href="{{ get_klass_url(attribute.classobject) }}">{{ attribute.classobject.__name__ }}</a>
                                    {% endif %}
                                </td>
                            </tr>
                {% if loop.last %}
                            </tbody>
                        </table>
                    </div>
                {% endif %}
            {% endfor %}
        </div>

        <!-- PROPERTIES -->
        <div class="row">
            {% for property in properties %}
                {% if loop.first %}
                <div id="method-list" class="span12 accordion">
                    <div id='method-buttons'>
                        <span class="btn btn-small" id="expand-methods-btn">Expand</span>
                        <span class="btn btn-small" id="collapse-methods-btn">Collapse</span>
                    </div>
                <h2>Properties</h2>
                {% endif %}

                {% if previous_name != property.name %}
                    <div class="method accordion-group">
                        <header class="accordion-heading btn" data-toggle="collapse" data-target="#{{ property.name }}">
                            <h3>
                                <code class="signature highlight">
                                    <span class="k">def</span>
                                    <span class="nf">{{ property.name }}</span>():
                                </code>
                                 <a class="headerlink" href="#{{ property.name }}" title="Permalink to this method">¶</a>
                                {% if property.children|length == 0 %}
                                    <small class="pull-right">{{ property.classobject.__name__ }}</small>
                                {% endif %}
                            </h3>
                        </header>
                        <div id="{{ property.name }}" class="accordion-body collapse in">
                            {% for accessor, accessor_code in property.accessors_code.items() %}
                                {% if accessor_code %}
                                <div class="namesake accordion-group">
                                    <header class="accordion-heading" data-toggle="collapse" data-target="#{{ property.name }}-{{ accessor }}">
                                        <h4 class="accordion-toggle">{{ accessor|capitalize }}</h4>
                                    </header>
                                    <div id="{{ property.name }}-{{ accessor }}" class="accordion-body collapse in">
                                        <div class="accordion-inner">
                                            {# {% if property.value.__doc__ %}<pre class="docstring">{{ property.value.__doc__ }}</pre>{% endif %} #}
                                            {{ accessor_code|safe }}
                                        </div>
                                    </div>
                                </div>
                                {% endif %}
                            {% endfor %}
                        </div>
                    </div>
                {% endif %}
                {% if loop.last %}</div>{% endif %}
                {% set previous_name=property.name %}
            {% endfor %}
        </div>

        <!-- UNAVAILABLE METHODS -->
        <div class="row">
          {% for method in unavailable_methods %}
              {% if loop.first %}
              <div class="span12" id="unused-methods">
              <h2>Methods used but not implemented in this class</h2>
              <ul class="unstyled">
              {% endif %}
                  <li><strong>{{method}}</strong></li>
              {% if loop.last %}</ul></div>{% endif %}
          {% endfor %}
        </div>

        <!-- METHODS -->
        <div class="row">
            {% for method in methods %}
                {% if loop.first %}
                <div id="method-list" class="span12 accordion">
                    <div id='method-buttons'>
                        <span class="btn btn-small" id="expand-methods-btn">Expand</span>
                        <span class="btn btn-small" id="collapse-methods-btn">Collapse</span>
                    </div>
                    <h2>Methods</h2>
                {% endif %}
                {% if previous_name != method.name %}
                    <div class="method accordion-group">
                        <header class="accordion-heading btn" data-toggle="collapse" data-target="#{{ method.name }}">
                            <h3>
                                <code class="signature highlight">
                                    <span class="k">def</span>
                                    <span class="nf">{{ method.name }}</span>(<span class="n">{{ method.params() }}</span>):
                                </code>
                                 <a class="headerlink" href="#{{ method.name }}" title="Permalink to this method">¶</a>
                                {% if method.children|length == 0 %}
                                    <small class="pull-right">{{ method.classobject.__name__ }}</small>
                                {% endif %}
                            </h3>
                        </header>
                        <div id="{{ method.name }}" class="accordion-body collapse in">
                            {% for child in [method] + method.children %}
                                {% if method.children|length != 0 %}
                                    <div class="namesake accordion-group">
                                        <header class="accordion-heading" data-toggle="collapse" data-target="#{{ child.name }}-{{ child.classobject.__name__ }}">
                                            <h4 class="accordion-toggle">{{ child.classobject.__name__ }}</h4>
                                        </header>
                                        <div id="{{ child.name }}-{{ child.classobject.__name__ }}" class="accordion-body collapse in">
                                            <div class="accordion-inner">
                                {% endif %}
                                                {% if child.value.__doc__ %}<pre class="docstring">{{ child.value.__doc__ }}</pre>{% endif %}
                                                {{ child.code()|safe }}
                                {% if method.children|length != 0 %}
                                            </div>
                                        </div>
                                    </div>
                                {% endif %}
                            {% endfor %}
                        </div>
                    </div>
                {% endif %}
                {% if loop.last %}</div>{% endif %}
                {% set previous_name=method.name %}
            {% endfor %}
        </div>

    </div>
{% endblock %}
<commit_msg>Remove unavaiable methods section<commit_after>{% extends "base.html" %}

{% block title %}{{ name }}{% endblock %}

{% block metatags %}
    <meta name="description" content="Detailed descriptions, with full methods and attributes of {{ name }} Django class.">
{% endblock %}

{% block extra_js %}
    <script>
        // Activate accordion
        $(function () {
            $(".collapse").collapse();
            // Method collapsing/expanding buttons
            $("#collapse-methods-btn").click(function() {
                CCBV.method_list.collapse();
            });
            $("#expand-methods-btn").click(function() {
                CCBV.method_list.expand();
            });

            function goToAnchor() {
              var anchor = window.location.hash.replace("#", "");
              $(".collapse").collapse('hide');
              if (anchor) {
                $("#" + anchor).collapse('show');
                $('#' + anchor + ' .collapse').collapse('show');
                setTimeout(function(){
                  console.log($('#' + anchor).attr('class'));
                  $('html, body').animate({
                    scrollTop: $('#' + anchor).offset().top - 70
                  }, 0);
                }, 500);
              }
            }

            $(document).ready(function() {
              goToAnchor();

              window.addEventListener("hashchange", function() { goToAnchor(); });

            });
        });
    </script>
    <script src="/static/ccbv.js"></script>
{% endblock %}


{% block page_header %}
    <h1><small>class</small>&nbsp;{{ this_klass_name }}</h1>
    <pre>from django.forms import {{ this_klass_name }}</pre>
    <div class="pull-right">
        {% if get_doc_link(this_klass) %}
            <a class="btn btn-small btn-info" href="{{ get_doc_link(this_klass) }}" target="_blank">Documentation</a>
        {% else %}
            <span class="btn btn-small btn-info disabled">Documentation</span>
        {% endif %}
        <a class="btn btn-small btn-info" href="{{ get_src_link(this_klass) }}" target="_blank">Source code</a>
    </div>
    {% if this_klass.__doc__ %}
        <pre class="docstring">{{ this_klass.__doc__ }}</pre>
    {% endif %}
{% endblock %}


{% block content %}
    <div class="span12">

        <!-- ANCESTORS -->
        <div class="row">
            {% for ancestor in ancestors %}
                {% if loop.first %}
                    <div class="span4">
                    <h2>Ancestors (<abbr title="Method Resolution Order">MRO</abbr>)</h2>
                    <ol start='0' id="ancestors">
                        <li><strong>{{ this_klass_name }}</strong></li>
                {% else %}
                        <li>
                            <a href="{{ get_klass_url(ancestor) }}" class="{% if ancestor in direct_ancestors %}direct{% endif %}">
                                {{ ancestor.__name__ }}
                            </a>
                        </li>
                {% endif %}
                {% if loop.last %}</ol></div>{% endif %}
            {% endfor %}
        </div>

        <!-- DESCENDANTS -->
        <div class="row">
            {% for descendant in descendants %}
                {% if loop.first %}
                    <div class="span4" id="descendants">
                    <h2>Descendants</h2>
                    <ul class="unstyled">
                    {% endif %}
                        <li><a href="{{ get_klass_url(descendant) }}">{{ descendant.__name__ }}</a></li>
                    {% if loop.last %}</ul></div>{% endif %}
            {% endfor %}
        </div>

        <!-- ATTRIBUTES -->
        <div class="row">
            {% for attribute in attributes %}
                {% if loop.first %}
                    <div class="span12">
                        <h2>Attributes</h2>
                        <table class="table table-striped table-bordered table-condensed">
                            <thead>
                                <tr>
                                    <th>&nbsp;</th>
                                    <th>Defined in</th>
                                </tr>
                            </thead>
                            <tbody>
                {% endif %}
                            <tr>
                                <td>
                                    <code class="attribute{%if attribute.overridden %} overridden{% endif %}">
                                        <strong>{{ attribute.name }}</strong> = {{ attribute.value|e }}
                                    </code>
                                </td>
                                <td style="min-width:100px">
                                    {% if attribute.classobject == this_klass %}
                                        {{ this_klass_name }}
                                    {% else %}
                                        <a href="{{ get_klass_url(attribute.classobject) }}">{{ attribute.classobject.__name__ }}</a>
                                    {% endif %}
                                </td>
                            </tr>
                {% if loop.last %}
                            </tbody>
                        </table>
                    </div>
                {% endif %}
            {% endfor %}
        </div>

        <!-- PROPERTIES -->
        <div class="row">
            {% for property in properties %}
                {% if loop.first %}
                <div id="method-list" class="span12 accordion">
                    <div id='method-buttons'>
                        <span class="btn btn-small" id="expand-methods-btn">Expand</span>
                        <span class="btn btn-small" id="collapse-methods-btn">Collapse</span>
                    </div>
                <h2>Properties</h2>
                {% endif %}

                {% if previous_name != property.name %}
                    <div class="method accordion-group">
                        <header class="accordion-heading btn" data-toggle="collapse" data-target="#{{ property.name }}">
                            <h3>
                                <code class="signature highlight">
                                    <span class="k">def</span>
                                    <span class="nf">{{ property.name }}</span>():
                                </code>
                                 <a class="headerlink" href="#{{ property.name }}" title="Permalink to this method">¶</a>
                                {% if property.children|length == 0 %}
                                    <small class="pull-right">{{ property.classobject.__name__ }}</small>
                                {% endif %}
                            </h3>
                        </header>
                        <div id="{{ property.name }}" class="accordion-body collapse in">
                            {% for accessor, accessor_code in property.accessors_code.items() %}
                                {% if accessor_code %}
                                <div class="namesake accordion-group">
                                    <header class="accordion-heading" data-toggle="collapse" data-target="#{{ property.name }}-{{ accessor }}">
                                        <h4 class="accordion-toggle">{{ accessor|capitalize }}</h4>
                                    </header>
                                    <div id="{{ property.name }}-{{ accessor }}" class="accordion-body collapse in">
                                        <div class="accordion-inner">
                                            {# {% if property.value.__doc__ %}<pre class="docstring">{{ property.value.__doc__ }}</pre>{% endif %} #}
                                            {{ accessor_code|safe }}
                                        </div>
                                    </div>
                                </div>
                                {% endif %}
                            {% endfor %}
                        </div>
                    </div>
                {% endif %}
                {% if loop.last %}</div>{% endif %}
                {% set previous_name=property.name %}
            {% endfor %}
        </div>

        <!-- METHODS -->
        <div class="row">
            {% for method in methods %}
                {% if loop.first %}
                <div id="method-list" class="span12 accordion">
                    <div id='method-buttons'>
                        <span class="btn btn-small" id="expand-methods-btn">Expand</span>
                        <span class="btn btn-small" id="collapse-methods-btn">Collapse</span>
                    </div>
                    <h2>Methods</h2>
                {% endif %}
                {% if previous_name != method.name %}
                    <div class="method accordion-group">
                        <header class="accordion-heading btn" data-toggle="collapse" data-target="#{{ method.name }}">
                            <h3>
                                <code class="signature highlight">
                                    <span class="k">def</span>
                                    <span class="nf">{{ method.name }}</span>(<span class="n">{{ method.params() }}</span>):
                                </code>
                                 <a class="headerlink" href="#{{ method.name }}" title="Permalink to this method">¶</a>
                                {% if method.children|length == 0 %}
                                    <small class="pull-right">{{ method.classobject.__name__ }}</small>
                                {% endif %}
                            </h3>
                        </header>
                        <div id="{{ method.name }}" class="accordion-body collapse in">
                            {% for child in [method] + method.children %}
                                {% if method.children|length != 0 %}
                                    <div class="namesake accordion-group">
                                        <header class="accordion-heading" data-toggle="collapse" data-target="#{{ child.name }}-{{ child.classobject.__name__ }}">
                                            <h4 class="accordion-toggle">{{ child.classobject.__name__ }}</h4>
                                        </header>
                                        <div id="{{ child.name }}-{{ child.classobject.__name__ }}" class="accordion-body collapse in">
                                            <div class="accordion-inner">
                                {% endif %}
                                                {% if child.value.__doc__ %}<pre class="docstring">{{ child.value.__doc__ }}</pre>{% endif %}
                                                {{ child.code()|safe }}
                                {% if method.children|length != 0 %}
                                            </div>
                                        </div>
                                    </div>
                                {% endif %}
                            {% endfor %}
                        </div>
                    </div>
                {% endif %}
                {% if loop.last %}</div>{% endif %}
                {% set previous_name=method.name %}
            {% endfor %}
        </div>

    </div>
{% endblock %}

{'fraction_non_alphanumeric': 0.1435782389231632, 'fraction_numerical': 0.0039691099702316756, 'mean_word_length': 1.018987893040676, 'pattern_counts': {'":': 0, '<': 364, '<?xml version=': 0, '>': 364, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 132, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '3357848', 'n_tokens_mistral': 5872, 'n_tokens_neox': 5191, 'n_words': 1060}