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

{% load cache %}
{% load i18n %}
{% load ifsetting_tag %}
{% load package_tags %}

{% block extra_head %}
    <link rel="stylesheet" href="{{ STATIC_URL }}css/home.css" />
{% endblock %}

{% block head_title %}{% trans "Welcome" %}{% endblock %}

{% block body_class %}home{% endblock %}

{% block body %}
    <div id="home-rightcol">
        <div id="home-search">
            <form action="{% url search%}">
                <input id="id_q" type="text" name="q" maxlength="100" value="search" />
                <input id="hidden-submit" type="submit" value="go" />
            </form>
        </div>        
        <div class="home-rightcolbox">
                <h1>Django Package of the Week</h1>
            {% for package in dpotw %}            
                <h2><a href="{% url package package.package.slug %}">{{ package.package.title }}</a></h2>
                <p>{{ package.package.repo_description }}</p>
            {% endfor %}
        </div>   

        <div class="home-rightcolbox">
                <h1>Grid of the Week</h1>
            {% for grid in gotw %}            
                <h2><a href="{% url grid grid.grid.slug %}">{{ grid.grid.title }}</a></h2>
                <p>{{ grid.grid.description }}</p>
            {% endfor %}
        </div>  
    </div>        
     
     {% for category in categories %}
        <h2>{{ category.title }}s ( {{ category.count }} )</h2>
        <p>{{ category.description }}</p>
        <table id="home-packages">
            <tr>
                <th>PyPi Downloads</th>
                <th>Name</th>
                <th>Commits</th>
                <th>Version</th>
                <th><img src="{{ STATIC_URL }}img/eye_20x20_clear.png" /></th>
                <th><img src="{{ STATIC_URL }}img/fork_20x20_clear.png" /></th>
            </tr>

            {% for package in category.packages %}
                <tr>
                    <td>{{ package.pypi_downloads }}</td>
                    <td><a href="{% url package package.slug %}">{{ package.title }}</a></td>
                    {% cache 500 commit_chart package %}                
                        <td><img id="package-githubcommits" src="http://chart.apis.google.com/chart?cht=bvg&chs=105x20&chd=t:{{package|commits_over_52}}&chco=666666&chbh=1,1,1&chds=0,20" /></td>
                    {% endcache %}                
                    <td>{{ package.pypi_version }}</td>
                    <td>{{ package.repo_watchers }}</td><commit_msg>Added Contribute box to homepage, with links to add package/grid pages.<commit_after>{% extends "site_base.html" %}

{% load cache %}
{% load i18n %}
{% load ifsetting_tag %}
{% load package_tags %}

{% block extra_head %}
    <link rel="stylesheet" href="{{ STATIC_URL }}css/home.css" />
{% endblock %}

{% block head_title %}{% trans "Welcome" %}{% endblock %}

{% block body_class %}home{% endblock %}

{% block body %}
    <div id="home-rightcol">
        <div id="home-search">
            <form action="{% url search%}">
                <input id="id_q" type="text" name="q" maxlength="100" value="search" />
                <input id="hidden-submit" type="submit" value="go" />
            </form>
        </div>        
        <div class="home-rightcolbox">
                <h1>Django Package of the Week</h1>
            {% for package in dpotw %}            
                <h2><a href="{% url package package.package.slug %}">{{ package.package.title }}</a></h2>
                <p>{{ package.package.repo_description }}</p>
            {% endfor %}
        </div>   

        <div class="home-rightcolbox">
                <h1>Grid of the Week</h1>
            {% for grid in gotw %}            
                <h2><a href="{% url grid grid.grid.slug %}">{{ grid.grid.title }}</a></h2>
                <p>{{ grid.grid.description }}</p>
            {% endfor %}
        </div>  

        <div class="home-rightcolbox">
                <h1>Contribute</h1>
                <p>Help us make this site more useful by <a href="{% url add_package %}">adding your package</a>, <a href="{% url add_grid %}">making new comparison grids</a>, or updating our listings with relevant info.</p>
        </div>  
    </div>        
     
     {% for category in categories %}
        <h2>{{ category.title }}s ( {{ category.count }} )</h2>
        <p>{{ category.description }}</p>
        <table id="home-packages">
            <tr>
                <th>PyPi Downloads</th>
                <th>Name</th>
                <th>Commits</th>
                <th>Version</th>
                <th><img src="{{ STATIC_URL }}img/eye_20x20_clear.png" /></th>
                <th><img src="{{ STATIC_URL }}img/fork_20x20_clear.png" /></th>
            </tr>

            {% for package in category.packages %}
                <tr>
                    <td>{{ package.pypi_downloads }}</td>
                    <td><a href="{% url package package.slug %}">{{ package.title }}</a></td>
                    {% cache 500 commit_chart package %}                
                        <td><img id="package-githubcommits" src="http://chart.apis.google.com/chart?cht=bvg&chs=105x20&chd=t:{{package|commits_over_52}}&chco=666666&chbh=1,1,1&chds=0,20" /></td>
                    {% endcache %}                
                    <td>{{ package.pypi_version }}</td>
                    <td>{{ package.repo_watchers }}</td>
{'fraction_non_alphanumeric': 0.1781503316138541, 'fraction_numerical': 0.01694915254237288, 'mean_word_length': 1.713143428285857, 'pattern_counts': {'":': 0, '<': 141, '<?xml version=': 0, '>': 141, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 4, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '6178242', 'n_tokens_mistral': 1828, 'n_tokens_neox': 1617, 'n_words': 357}