<commit_before>{% load url from future %}<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="utf-8">
    <title>{% block title %}Django Class-Based-View Inspector{% endblock %} -- Classy CBV</title>
    <meta name="description" content="">
    <meta name="author" content="">

    <!-- Le HTML5 shim, for IE6-8 support of HTML elements -->
    <!--[if lt IE 9]>
        <script src="http://html5shim.googlecode.com/svn/trunk/html5.js"></script>
    <![endif]-->

    <!-- Le styles from Twitter Bootstrap-->
    <!--link href="http://twitter.github.com/bootstrap/1.4.0/bootstrap.min.css" rel="stylesheet"-->
    <link href="{{ STATIC_URL }}bootstrap.css" rel="stylesheet">
    <link href="{{ STATIC_URL }}style.css" rel="stylesheet">
    <!--link href="http://twitter.github.com/bootstrap/assets/css/bootstrap-responsive.css" rel="stylesheet"-->
    {% if push_state_url %}
    <link rel="canonical" href="{{ push_state_url }}">
    <script type="text/javascript">
        window.history.replaceState({}, '', '{{ push_state_url }}');
    </script>
    {% endif %}
    {% block extraheaders %}
    {% endblock %}
</head>
<body>
    <div class="container">
        <header>
            <div id="logo">Classy <abbr title="Class Based Views (in Django)">CBV</abbr></div>
            {% block breadcrumbs %}{%endblock breadcrumbs %}
            <hr />
        </header>
        {% block content %}
            <div class="row">
                <div class="span12">
                    <div class="page-header">
                    <h1>Classy &mdash; understand Django's class-based views</h1>
                </div>
                </div>
                <div class="span8">
                    <h2>What's a class-based view anyway?</h2>


                    <p>Django 1.3 came with class-based generic views. These are really awesome, and
                    very powerfully coded with mixins and base classes all over the shop. This
                    means they're much more than just a couple of generic shortcuts, they also
                    provide utilities which can be mixed in the much more complex views that you
                    write yourself.</p>

                    <h2>Great! So what's the point of the inspector?</h2>

                    <p>All of this power comes at the expense of simplicity. Trying to work out
                    exactly which method you need to customise on your <code>UpdateView</code> can feel a
                    little like wading through spaghetti: it has 8 separate ancestors (plus
                    <code>object</code>) spread across 3 different files. So working out that you wanted to
                    tweak <code>UpdateView.get_initial</code> and what its keyword arguments are is a bit of
                    a faff.</p>
                </div>
                <div class="span4">
                    <h2>Versions</h2>
                    {% for pv in projectversion_list %}
                        {% if forloop.first %}<ul>{% endif %}
                        <li><a href="{{ pv.get_absolute_url }}">{{ pv }}</a></li>
                        {% if forloop.last %}</ul>{% endif %}
                    {% endfor %}
                </div>
            </div><commit_msg>Gramor.<commit_after>{% load url from future %}<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="utf-8">
    <title>{% block title %}Django Class-Based-View Inspector{% endblock %} -- Classy CBV</title>
    <meta name="description" content="">
    <meta name="author" content="">

    <!-- Le HTML5 shim, for IE6-8 support of HTML elements -->
    <!--[if lt IE 9]>
        <script src="http://html5shim.googlecode.com/svn/trunk/html5.js"></script>
    <![endif]-->

    <!-- Le styles from Twitter Bootstrap-->
    <!--link href="http://twitter.github.com/bootstrap/1.4.0/bootstrap.min.css" rel="stylesheet"-->
    <link href="{{ STATIC_URL }}bootstrap.css" rel="stylesheet">
    <link href="{{ STATIC_URL }}style.css" rel="stylesheet">
    <!--link href="http://twitter.github.com/bootstrap/assets/css/bootstrap-responsive.css" rel="stylesheet"-->
    {% if push_state_url %}
    <link rel="canonical" href="{{ push_state_url }}">
    <script type="text/javascript">
        window.history.replaceState({}, '', '{{ push_state_url }}');
    </script>
    {% endif %}
    {% block extraheaders %}
    {% endblock %}
</head>
<body>
    <div class="container">
        <header>
            <div id="logo">Classy <abbr title="Class Based Views (in Django)">CBV</abbr></div>
            {% block breadcrumbs %}{%endblock breadcrumbs %}
            <hr />
        </header>
        {% block content %}
            <div class="row">
                <div class="span12">
                    <div class="page-header">
                    <h1>Classy &mdash; understand Django's class-based views</h1>
                </div>
                </div>
                <div class="span8">
                    <h2>What's a class-based view anyway?</h2>


                    <p>Django 1.3 came with class-based generic views. These are really awesome, and
                    very powerfully coded with mixins and base classes all over the shop. This
                    means they're much more than just a couple of generic shortcuts, they also
                    provide utilities which can be mixed into the much more complex views that you
                    write yourself.</p>

                    <h2>Great! So what's the point of the inspector?</h2>

                    <p>All of this power comes at the expense of simplicity. Trying to work out
                    exactly which method you need to customise on your <code>UpdateView</code> can feel a
                    little like wading through spaghetti: it has 8 separate ancestors (plus
                    <code>object</code>) spread across 3 different files. So working out that you wanted to
                    tweak <code>UpdateView.get_initial</code> and what its keyword arguments are is a bit of
                    a faff.</p>
                </div>
                <div class="span4">
                    <h2>Versions</h2>
                    {% for pv in projectversion_list %}
                        {% if forloop.first %}<ul>{% endif %}
                        <li><a href="{{ pv.get_absolute_url }}">{{ pv }}</a></li>
                        {% if forloop.last %}</ul>{% endif %}
                    {% endfor %}
                </div>
            </div>
{'fraction_non_alphanumeric': 0.1375309405940594, 'fraction_numerical': 0.008044554455445545, 'mean_word_length': 1.853045013239188, 'pattern_counts': {'":': 0, '<': 133, '<?xml version=': 0, '>': 133, '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': '5504757', 'n_tokens_mistral': 1884, 'n_tokens_neox': 1703, 'n_words': 543}