urls from future in templates

This commit is contained in:
volpino 2012-05-06 20:27:14 +02:00
parent 948c5b8c39
commit 23f43e869a
15 changed files with 132 additions and 103 deletions

View File

@ -1,10 +1,12 @@
{% load url from future %}
<?xml version="1.0" encoding="utf8"?> <?xml version="1.0" encoding="utf8"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><html xmlns="http://www.w3.org/1999/xhtml" xml:lang="fr"> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><html xmlns="http://www.w3.org/1999/xhtml" xml:lang="fr">
<head> <head>
<title>{% block title %}euscan{% endblock %}</title> <title>{% block title %}euscan{% endblock %}</title>
<meta http-equiv="content-type" content="text/html; charset=utf-8" /> <meta http-equiv="content-type" content="text/html; charset=utf-8" />
{% block meta %} {% block meta %}
<link rel="alternate" type="application/atom+xml" title="Global log" href="{% url global_feed %}" /> <link rel="alternate" type="application/atom+xml" title="Global log" href="{% url "global_feed" %}" />
{% endblock %} {% endblock %}
{% block css %} {% block css %}
<link rel="stylesheet" type="text/css" href="{{ STATIC_URL }}css/style.css" media="screen" title="Normal" /> <link rel="stylesheet" type="text/css" href="{{ STATIC_URL }}css/style.css" media="screen" title="Normal" />
@ -27,13 +29,13 @@
<div class="menu"> <div class="menu">
<ul> <ul>
{% block menu %} {% block menu %}
<li><a href="{% url djeuscan.views.index %}">Home</a></li> <li><a href="{% url "index" %}">Home</a></li>
<li><a href="{% url djeuscan.views.categories %}">Categories</a></li> <li><a href="{% url "categories" %}">Categories</a></li>
<li><a href="{% url djeuscan.views.herds %}">Herds</a></li> <li><a href="{% url "herds" %}">Herds</a></li>
<li><a href="{% url djeuscan.views.maintainers %}">Maintainers</a></li> <li><a href="{% url "maintainers" %}">Maintainers</a></li>
<li><a href="{% url djeuscan.views.overlays %}">Overlays</a></li> <li><a href="{% url "overlays" %}">Overlays</a></li>
<li><a href="{% url djeuscan.views.world %}">Scan World</a></li> <li><a href="{% url "world" %}">Scan World</a></li>
<li><a href="{% url djeuscan.views.statistics %}">Statistics</a></li> <li><a href="{% url "statistics" %}">Statistics</a></li>
<!-- <!--
<li>---</li> <li>---</li>
<li><a href="#">Login</a></li> <li><a href="#">Login</a></li>
@ -43,12 +45,12 @@
{% block menu_feed %} {% block menu_feed %}
<li> <li>
<img src="{{ STATIC_URL }}img/feed.png" alt="feed" /> <img src="{{ STATIC_URL }}img/feed.png" alt="feed" />
<a title="Global Feed" href="{% url global_feed %}">Global Feed</a> <a title="Global Feed" href="{% url "global_feed" %}">Global Feed</a>
</li> </li>
{% endblock %} {% endblock %}
<li>---</li> <li>---</li>
<li><a href="{% url djeuscan.views.api %}">API</a></li> <li><a href="{% url "api" %}">API</a></li>
<li><a href="{% url djeuscan.views.about %}">About</a></li> <li><a href="{% url "about" %}">About</a></li>
{% endblock %} {% endblock %}
</ul> </ul>
</div> </div>

View File

@ -7,21 +7,21 @@
{% if infos.n_overlay == 0 or infos.n_overlay <= infos.n_packaged %} {% if infos.n_overlay == 0 or infos.n_overlay <= infos.n_packaged %}
<td> <td>
{% else %}{% if infos.n_overlay < infos.n_packaged %} {% elif infos.n_overlay < infos.n_packaged %}
<td class="bad"> <td class="bad">
{% else %} {% else %}
<td class="ugly"> <td class="ugly">
{% endif %}{% endif %} {% endif %}
{{ infos.n_overlay }} {{ infos.n_overlay }}
</td> </td>
{% if infos.n_versions == infos.n_packaged|add:infos.n_overlay %} {% if infos.n_versions == infos.n_packaged|add:infos.n_overlay %}
<td> <td>
{% else %}{% if infos.n_versions < infos.n_packaged|add:infos.n_overlay|mul:2 %} {% elif infos.n_versions < infos.n_packaged|add:infos.n_overlay|mul:2 %}
<td class="bad"> <td class="bad">
{% else %} {% else %}
<td class="ugly"> <td class="ugly">
{% endif %}{% endif %} {% endif %}
{{ infos.n_versions|sub:infos.n_packaged|sub:infos.n_overlay }} {{ infos.n_versions|sub:infos.n_packaged|sub:infos.n_overlay }}
</td> </td>

View File

@ -3,6 +3,8 @@
{% load div %} {% load div %}
{% load mul %} {% load mul %}
{% load url from future %}
<table id="table" class="display"> <table id="table" class="display">
<thead> <thead>
<th>Package</th> <th>Package</th>
@ -18,7 +20,7 @@
{% for package in packages %} {% for package in packages %}
<tr> <tr>
<td> <td>
<a href="{% url djeuscan.views.package package.category package.name %}"> <a href="{% url "package" package.category package.name %}">
{{ package.category }}/{{ package.name }} {{ package.category }}/{{ package.name }}
</a> </a>
{% package_bar package %} {% package_bar package %}

View File

@ -1,15 +1,17 @@
{% extends "_base.html" %} {% extends "_base.html" %}
{% load url from future %}
{% block content %} {% block content %}
<h2>API</h2> <h2>API</h2>
<p> <p>
<ul> <ul>
<li><a href="{% url api.views.root 'json' %}">/api/1.0/api.json</a></li> <li><a href="{% url "api.views.root" 'json' %}">/api/1.0/api.json</a></li>
<li><a href="{% url api.views.statistics 'json' %}">/api/1.0/statistics.json</a></li> <li><a href="{% url "api.views.statistics" 'json' %}">/api/1.0/statistics.json</a></li>
<li><a href="{% url api.views.maintainers 'json' %}">/api/1.0/maintainers.json</a></li> <li><a href="{% url "api.views.maintainers" 'json' %}">/api/1.0/maintainers.json</a></li>
<li><a href="{% url api.views.herds 'json' %}">/api/1.0/herds.json</a></li> <li><a href="{% url "api.views.herds" 'json' %}">/api/1.0/herds.json</a></li>
<li><a href="{% url api.views.categories 'json' %}">/api/1.0/categories.json</a></li> <li><a href="{% url "api.views.categories" 'json' %}">/api/1.0/categories.json</a></li>
<li>/api/1.0/packages/by-maintainer/&lt;maintainer-id&gt;.json</li> <li>/api/1.0/packages/by-maintainer/&lt;maintainer-id&gt;.json</li>
<li>/api/1.0/packages/by-category/&lt;category&gt;.json</li> <li>/api/1.0/packages/by-category/&lt;category&gt;.json</li>
<li>/api/1.0/packages/by-herd/&lt;herd&gt;.json</li> <li>/api/1.0/packages/by-herd/&lt;herd&gt;.json</li>

View File

@ -1,6 +1,7 @@
{% extends "euscan/_datatable.html" %} {% extends "euscan/_datatable.html" %}
{% load packages %} {% load packages %}
{% load url from future %}
{% block title %} {% block title %}
{{ block.super }} - categories {{ block.super }} - categories
@ -24,14 +25,14 @@
{% for category in categories %} {% for category in categories %}
<tr> <tr>
<td> <td>
<a href="{% url djeuscan.views.category category.category %}">{{ category.category }}</a> <a href="{% url "category" category.category %}">{{ category.category }}</a>
{% package_bar category %} {% package_bar category %}
</td> </td>
{% package_cols category %} {% package_cols category %}
{% if request.GET.extras %} {% if request.GET.extras %}
<td> <td>
<img src="{% url djeuscan.views.chart_category category.category 'packages-monthly-small' %}" /> <img src="{% url "chart_category" category.category 'packages-monthly-small' %}" />
<img src="{% url djeuscan.views.chart_category category.category 'versions-monthly-small' %}" /> <img src="{% url "chart_category" category.category 'versions-monthly-small' %}" />
</td> </td>
{% endif %} {% endif %}
</tr> </tr>

View File

@ -1,6 +1,7 @@
{% extends "euscan/_datatable.html" %} {% extends "euscan/_datatable.html" %}
{% load packages %} {% load packages %}
{% load url from future %}
{% block title %} {% block title %}
{{ block.super }} - Category: {{ category }} {{ block.super }} - Category: {{ category }}
@ -10,7 +11,7 @@
{{ block.super }} {{ block.super }}
<li> <li>
<img src="{{ STATIC_URL }}/img/feed.png" alt="feed" /> <img src="{{ STATIC_URL }}/img/feed.png" alt="feed" />
<a title="{{ category }} Feed" href="{% url category_feed category %}">{{ category }}</a> <a title="{{ category }} Feed" href="{% url "category_feed" category %}">{{ category }}</a>
</li> </li>
{% endblock %} {% endblock %}
@ -22,19 +23,19 @@
<h3>Statistics</h2> <h3>Statistics</h2>
<h4>Current statistics</h4> <h4>Current statistics</h4>
<p> <p>
<img src="{% url djeuscan.views.chart_category category 'pie-versions' %}" /> <img src="{% url "chart_category" category 'pie-versions' %}" />
<img src="{% url djeuscan.views.chart_category category 'pie-packages' %}" /> <img src="{% url "chart_category" category 'pie-packages' %}" />
</p> </p>
<h4>All Time</h4> <h4>All Time</h4>
<p> <p>
<img src="{% url djeuscan.views.chart_category category 'versions-weekly' %}" /> <img src="{% url "chart_category" category 'versions-weekly' %}" />
<img src="{% url djeuscan.views.chart_category category 'versions-monthly' %}" /> <img src="{% url "chart_category" category 'versions-monthly' %}" />
</p> </p>
<p> <p>
<img src="{% url djeuscan.views.chart_category category 'packages-weekly' %}" /> <img src="{% url "chart_category" category 'packages-weekly' %}" />
<img src="{% url djeuscan.views.chart_category category 'packages-monthly' %}" /> <img src="{% url "chart_category" category 'packages-monthly' %}" />
</p> </p>
{% endblock %} {% endblock %}
@ -44,9 +45,9 @@
<div class="menu"> <div class="menu">
<dl> <dl>
<dt>Versions</dt> <dt>Versions</dt>
<dd><img src="{% url djeuscan.views.chart_category category 'versions-monthly-small' %}" /></dd> <dd><img src="{% url "chart_category" category 'versions-monthly-small' %}" /></dd>
<dt>Packages</dt> <dt>Packages</dt>
<dd><img src="{% url djeuscan.views.chart_category category 'packages-monthly-small' %}" /></dd> <dd><img src="{% url "chart_category" category 'packages-monthly-small' %}" /></dd>
</dl> </dl>
</div> </div>

View File

@ -1,6 +1,7 @@
{% extends "euscan/_datatable.html" %} {% extends "euscan/_datatable.html" %}
{% load packages %} {% load packages %}
{% load url from future %}
{% block title %} {% block title %}
{{ block.super }} - Herd: {{ herd.herd }} {{ block.super }} - Herd: {{ herd.herd }}
@ -10,7 +11,7 @@
{{ block.super }} {{ block.super }}
<li> <li>
<img src="{{ STATIC_URL }}/img/feed.png" alt="feed" /> <img src="{{ STATIC_URL }}/img/feed.png" alt="feed" />
<a title="{{ herd.herd }} Feed" href="{% url herd_feed herd.herd %}">{{ herd.herd }}</a> <a title="{{ herd.herd }} Feed" href="{% url "herd_feed" herd.herd %}">{{ herd.herd }}</a>
</li> </li>
{% endblock %} {% endblock %}
@ -21,18 +22,18 @@
<h3>Statistics</h2> <h3>Statistics</h2>
<h4>Current statistics</h4> <h4>Current statistics</h4>
<p> <p>
<img src="{% url djeuscan.views.chart_herd herd.herd 'pie-versions' %}" /> <img src="{% url "chart_herd" herd.herd 'pie-versions' %}" />
<img src="{% url djeuscan.views.chart_herd herd.herd 'pie-packages' %}" /> <img src="{% url "chart_herd" herd.herd 'pie-packages' %}" />
</p> </p>
<h4>All Time</h4> <h4>All Time</h4>
<p> <p>
<img src="{% url djeuscan.views.chart_herd herd.herd 'versions-weekly' %}" /> <img src="{% url "chart_herd" herd.herd 'versions-weekly' %}" />
<img src="{% url djeuscan.views.chart_herd herd.herd 'versions-monthly' %}" /> <img src="{% url "chart_herd" herd.herd 'versions-monthly' %}" />
<p> <p>
</p> </p>
<img src="{% url djeuscan.views.chart_herd herd.herd 'packages-weekly' %}" /> <img src="{% url "chart_herd" herd.herd 'packages-weekly' %}" />
<img src="{% url djeuscan.views.chart_herd herd.herd 'packages-monthly' %}" /> <img src="{% url "chart_herd" herd.herd 'packages-monthly' %}" />
</p> </p>
{% endblock %} {% endblock %}
@ -42,9 +43,9 @@
<div class="menu"> <div class="menu">
<dl> <dl>
<dt>Versions</dt> <dt>Versions</dt>
<dd><img src="{% url djeuscan.views.chart_herd herd.herd 'versions-monthly-small' %}" /></dd> <dd><img src="{% url "chart_herd" herd.herd 'versions-monthly-small' %}" /></dd>
<dt>Packages</dt> <dt>Packages</dt>
<dd><img src="{% url djeuscan.views.chart_herd herd.herd 'packages-monthly-small' %}" /></dd> <dd><img src="{% url "chart_herd" herd.herd 'packages-monthly-small' %}" /></dd>
</dl> </dl>
</div> </div>

View File

@ -1,6 +1,7 @@
{% extends "euscan/_datatable.html" %} {% extends "euscan/_datatable.html" %}
{% load packages %} {% load packages %}
{% load url from future %}
{% block title %} {% block title %}
{{ block.super }} - herds {{ block.super }} - herds
@ -23,7 +24,7 @@
{% for herd in herds %} {% for herd in herds %}
<tr> <tr>
<td> <td>
<a href="{% url djeuscan.views.herd herd.herds__herd %}"> <a href="{% url "herd" herd.herds__herd %}">
{{ herd.herds__herd }} {{ herd.herds__herd }}
</a> </a>
{% package_bar herd %} {% package_bar herd %}
@ -31,8 +32,8 @@
{% package_cols herd %} {% package_cols herd %}
{% if request.GET.extras %} {% if request.GET.extras %}
<td> <td>
<img src="{% url djeuscan.views.chart_herd herd.herds__herd 'packages-monthly-small' %}" /> <img src="{% url "chart_herd" herd.herds__herd 'packages-monthly-small' %}" />
<img src="{% url djeuscan.views.chart_herd herd.herds__herd 'versions-monthly-small' %}" /> <img src="{% url "chart_herd" herd.herds__herd 'versions-monthly-small' %}" />
</td> </td>
{% endif %} {% endif %}
</tr> </tr>

View File

@ -5,10 +5,12 @@
{% block content %} {% block content %}
<h2>What's euscan ?</h2> <h2>What's euscan ?</h2>
<p> <p>
Euscan is both a tool to check if an ebuild is outdated (app-portage/euscan) and a web interface. Euscan is both a tool to check if an ebuild is outdated (app-portage/euscan)
and a web interface.
</p> </p>
<p> <p>
This web interface allow you to browse the portage tree, and find outdated ebuilds. It is designed to help maintainers monitor their packages and bump them. This web interface allow you to browse the portage tree, and find outdated
ebuilds. It is designed to help maintainers monitor their packages and bump them.
</p> </p>
<h2>Overview</h2> <h2>Overview</h2>

View File

@ -1,6 +1,7 @@
{% extends "euscan/_datatable.html" %} {% extends "euscan/_datatable.html" %}
{% load packages %} {% load packages %}
{% load url from future %}
{% block title %} {% block title %}
{{ block.super }} - Maintainer: {{ maintainer.name }} {{ block.super }} - Maintainer: {{ maintainer.name }}
@ -10,7 +11,9 @@
{{ block.super }} {{ block.super }}
<li> <li>
<img src="{{ STATIC_URL }}/img/feed.png" alt="feed" /> <img src="{{ STATIC_URL }}/img/feed.png" alt="feed" />
<a title="{{ maintainer.name }} Feed" href="{% url maintainer_feed maintainer.id %}">{{ maintainer.name }}</a> <a title="{{ maintainer.name }} Feed" href="{% url "maintainer_feed" maintainer.id %}">
{{ maintainer.name }}
</a>
</li> </li>
{% endblock %} {% endblock %}
@ -21,19 +24,19 @@
<h3>Statistics</h2> <h3>Statistics</h2>
<h4>Current statistics</h4> <h4>Current statistics</h4>
<p> <p>
<img src="{% url djeuscan.views.chart_maintainer maintainer.id 'pie-versions' %}" /> <img src="{% url "chart_maintainer" maintainer.id 'pie-versions' %}" />
<img src="{% url djeuscan.views.chart_maintainer maintainer.id 'pie-packages' %}" /> <img src="{% url "chart_maintainer" maintainer.id 'pie-packages' %}" />
</p> </p>
<h4>All Time</h4> <h4>All Time</h4>
<p> <p>
<img src="{% url djeuscan.views.chart_maintainer maintainer.id 'versions-weekly' %}" /> <img src="{% url "chart_maintainer" maintainer.id 'versions-weekly' %}" />
<img src="{% url djeuscan.views.chart_maintainer maintainer.id 'versions-monthly' %}" /> <img src="{% url "chart_maintainer" maintainer.id 'versions-monthly' %}" />
</p> </p>
<p> <p>
<img src="{% url djeuscan.views.chart_maintainer maintainer.id 'packages-weekly' %}" /> <img src="{% url "chart_maintainer" maintainer.id 'packages-weekly' %}" />
<img src="{% url djeuscan.views.chart_maintainer maintainer.id 'packages-monthly' %}" /> <img src="{% url "chart_maintainer" maintainer.id 'packages-monthly' %}" />
</p> </p>
{% endblock %} {% endblock %}
@ -42,9 +45,9 @@
<div class="menu"> <div class="menu">
<dl> <dl>
<dt>Versions</dt> <dt>Versions</dt>
<dd><img src="{% url djeuscan.views.chart_maintainer maintainer.id 'versions-monthly-small' %}" /></dd> <dd><img src="{% url "chart_maintainer" maintainer.id 'versions-monthly-small' %}" /></dd>
<dt>Packages</dt> <dt>Packages</dt>
<dd><img src="{% url djeuscan.views.chart_maintainer maintainer.id 'packages-monthly-small' %}" /></dd> <dd><img src="{% url "chart_maintainer" maintainer.id 'packages-monthly-small' %}" /></dd>
</dl> </dl>
</div> </div>

View File

@ -1,6 +1,7 @@
{% extends "euscan/_datatable.html" %} {% extends "euscan/_datatable.html" %}
{% load packages %} {% load packages %}
{% load url from future %}
{% block title %} {% block title %}
{{ block.super }} - maintainers {{ block.super }} - maintainers
@ -23,7 +24,7 @@
{% for maintainer in maintainers %} {% for maintainer in maintainers %}
<tr> <tr>
<td> <td>
<a href="{% url djeuscan.views.maintainer maintainer.maintainers__id %}"> <a href="{% url "maintainer" maintainer.maintainers__id %}">
{% if maintainer.maintainers__name != maintainer.maintainers__email %} {% if maintainer.maintainers__name != maintainer.maintainers__email %}
{{ maintainer.maintainers__name }} &lt;{{ maintainer.maintainers__email }}&gt; {{ maintainer.maintainers__name }} &lt;{{ maintainer.maintainers__email }}&gt;
{% else %} {% else %}
@ -33,12 +34,14 @@
{% package_bar maintainer %} {% package_bar maintainer %}
</td> </td>
{% package_cols maintainer %} {% package_cols maintainer %}
{% if request.GET.extras %} {% if request.GET.extras %}
<td> <td>
<img src="{% url djeuscan.views.chart_maintainer maintainer.maintainers__id 'packages-monthly-small' %}" /> <img src="{% url "chart_maintainer" maintainer.maintainers__id 'packages-monthly-small' %}" />
<img src="{% url djeuscan.views.chart_maintainer maintainer.maintainers__id 'versions-monthly-small' %}" /> <img src="{% url "chart_maintainer" maintainer.maintainers__id 'versions-monthly-small' %}" />
</td> </td>
{% endif %} {% endif %}
</tr> </tr>
{% endfor %} {% endfor %}
</tbody> </tbody>

View File

@ -1,6 +1,7 @@
{% extends "euscan/_datatable.html" %} {% extends "euscan/_datatable.html" %}
{% load packages %} {% load packages %}
{% load url from future %}
{% block title %} {% block title %}
{{ block.super }} - overlays {{ block.super }} - overlays
@ -17,7 +18,9 @@
{% for overlay in overlays %} {% for overlay in overlays %}
<tr> <tr>
<td> <td>
<a href="{% url djeuscan.views.overlay overlay.version__overlay %}">{{ overlay.version__overlay }}</a> <a href="{% url "overlay" overlay.version__overlay %}">
{{ overlay.version__overlay }}
</a>
</td> </td>
</tr> </tr>
{% endfor %} {% endfor %}

View File

@ -1,17 +1,21 @@
{% extends "euscan/_datatable.html" %} {% extends "euscan/_datatable.html" %}
{% load sub %} {% load sub %}
{% load url from future %}
{% block meta %} {% block meta %}
{{ block.super }} {{ block.super }}
<link rel="alternate" type="application/atom+xml" title="{{ package }} Feed" href="{% url package_feed package.category package.name %}" /> <link rel="alternate" type="application/atom+xml" title="{{ package }} Feed"
href="{% url "package_feed" package.category package.name %}" />
{% endblock %} {% endblock %}
{% block menu_feed %} {% block menu_feed %}
{{ block.super }} {{ block.super }}
<li> <li>
<img src="{{ STATIC_URL }}/img/feed.png" alt="feed" /> <img src="{{ STATIC_URL }}/img/feed.png" alt="feed" />
<a title="{{ package }} Feed" href="{% url package_feed package.category package.name %}">{{ package }}</a> <a title="{{ package }} Feed" href="{% url "package_feed" package.category package.name %}">
{{ package }}
</a>
</li> </li>
{% endblock %} {% endblock %}
@ -38,7 +42,7 @@
<dt>Herds</dt> <dt>Herds</dt>
<dd> <dd>
{% for herd in package.herds.all %} {% for herd in package.herds.all %}
<a href="{% url djeuscan.views.herd herd.herd %}"> <a href="{% url "herd" herd.herd %}">
{{ herd.herd }} {{ herd.herd }}
</a> </a>
&lt;{{ herd.email }}&gt; &lt;{{ herd.email }}&gt;
@ -50,12 +54,12 @@
<dd> <dd>
{% for maintainer in package.maintainers.all %} {% for maintainer in package.maintainers.all %}
{% if maintainer.name != maintainer.email %} {% if maintainer.name != maintainer.email %}
<a href="{% url djeuscan.views.maintainer maintainer.id %}"> <a href="{% url "maintainer" maintainer.id %}">
{{ maintainer.name }} {{ maintainer.name }}
</a> </a>
&lt;{{ maintainer.email }}&gt; &lt;{{ maintainer.email }}&gt;
{% else %} {% else %}
<a href="{% url djeuscan.views.maintainer maintainer.id %}"> <a href="{% url "maintainer" maintainer.id %}">
{{ maintainer.email }} {{ maintainer.email }}
</a> </a>
{% endif %} {% endif %}

View File

@ -1,19 +1,21 @@
{% extends "_base.html" %} {% extends "_base.html" %}
{% load url from future %}
{% block content %} {% block content %}
<h2>What's euscan ?</h2> <h2>What's euscan ?</h2>
<h2>Statistics</h2> <h2>Statistics</h2>
<h3>Current statistics</h3> <h3>Current statistics</h3>
<img src="{% url djeuscan.views.chart 'pie-versions' %}" /> <img src="{% url "chart" 'pie-versions' %}" />
<img src="{% url djeuscan.views.chart 'pie-packages' %}" /> <img src="{% url "chart" 'pie-packages' %}" />
<h3>All time statistics</h3> <h3>All time statistics</h3>
<img src="{% url djeuscan.views.chart 'packages-weekly' %}" /> <img src="{% url "chart" 'packages-weekly' %}" />
<img src="{% url djeuscan.views.chart 'packages-monthly' %}" /> <img src="{% url "chart" 'packages-monthly' %}" />
<img src="{% url djeuscan.views.chart 'versions-weekly' %}" /> <img src="{% url "chart" 'versions-weekly' %}" />
<img src="{% url djeuscan.views.chart 'versions-monthly' %}" /> <img src="{% url "chart" 'versions-monthly' %}" />
{% endblock %} {% endblock %}

View File

@ -1,5 +1,7 @@
{% extends "_base.html" %} {% extends "_base.html" %}
{% load url from future %}
{% block title %} {% block title %}
{{ block.super }} - World scan {{ block.super }} - World scan
{% endblock %} {% endblock %}
@ -11,7 +13,7 @@
<p>Import your /var/lib/portage/world file</p> <p>Import your /var/lib/portage/world file</p>
<form action="{% url djeuscan.views.world_scan %}" method="post" enctype="multipart/form-data">{% csrf_token %} <form action="{% url "world_scan" %}" method="post" enctype="multipart/form-data">{% csrf_token %}
{{ world_form.as_p }} {{ world_form.as_p }}
<input type="submit" value="Submit" /> <input type="submit" value="Submit" />
</form> </form>
@ -20,7 +22,7 @@
<p>Or just list some packages</p> <p>Or just list some packages</p>
<form action="{% url djeuscan.views.world_scan %}" method="post">{% csrf_token %} <form action="{% url "world_scan" %}" method="post">{% csrf_token %}
{{ packages_form.as_p }} {{ packages_form.as_p }}
<input type="submit" value="Submit" /> <input type="submit" value="Submit" />
</form> </form>