apply new pre-commit configuration

This commit is contained in:
Frédéric Péters 2023-05-12 23:19:35 +02:00
parent b17e32f2c1
commit eb8be94a58
22 changed files with 309 additions and 308 deletions

30
debian/control vendored
View File

@ -2,28 +2,32 @@ Source: scrutiny
Maintainer: Frederic Peters <fpters@entrouvert.com>
Section: python
Priority: optional
Build-Depends: python3-setuptools, python3-all, debhelper-compat (= 12), dh-python
Build-Depends: debhelper-compat (= 12),
dh-python,
python3-all,
python3-setuptools,
Standards-Version: 3.9.6
Package: python3-scrutiny
Architecture: all
Depends: ${misc:Depends}, ${python3:Depends},
python3-django (>= 2:2.2),
python3-gadjo,
python3-requests
Depends: python3-django (>= 2:2.2),
python3-gadjo,
python3-requests,
${misc:Depends},
${python3:Depends},
Recommends: python3-django-mellon
Description: Tracker of installed modules
Package: scrutiny
Architecture: all
Depends: ${misc:Depends},
python3-scrutiny (= ${binary:Version}),
python3-memcache,
python3-psycopg2,
python3-redmine,
uwsgi,
uwsgi-plugin-python3,
memcached
Depends: memcached,
python3-memcache,
python3-psycopg2,
python3-redmine,
python3-scrutiny (= ${binary:Version}),
uwsgi,
uwsgi-plugin-python3,
${misc:Depends},
Recommends: nginx, postgresql
Breaks: python-scrutiny (<<0.1.post69)
Replaces: python-scrutiny (<<0.1.post69)

View File

@ -1,6 +1,6 @@
/etc/scrutiny
/usr/lib/scrutiny
/var/lib/scrutiny/collectstatic
/var/lib/scrutiny/tenants
/var/lib/scrutiny/media
/var/lib/scrutiny/tenants
/var/log/scrutiny

View File

@ -1,4 +1,4 @@
debian/debian_config.py /usr/lib/scrutiny
debian/scrutiny-manage /usr/bin
debian/settings.py /etc/scrutiny
debian/debian_config.py /usr/lib/scrutiny
debian/uwsgi.ini /etc/scrutiny

View File

@ -2,7 +2,6 @@ from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = []
operations = [

View File

@ -2,7 +2,6 @@ from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('projects', '0001_initial'),
]

View File

@ -2,7 +2,6 @@ from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('projects', '0002_auto_20150325_0908'),
]

View File

@ -2,7 +2,6 @@ from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('projects', '0003_auto_20150419_0937'),
]

View File

@ -4,7 +4,6 @@ from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('projects', '0004_auto_20150428_1348'),
]

View File

@ -4,7 +4,7 @@ import subprocess
from django.conf import settings
from django.db import models
from django.utils.encoding import force_text
from django.utils.encoding import force_str
class Project(models.Model):
@ -134,7 +134,7 @@ class Module(models.Model):
p = subprocess.Popen(cmd, **kws)
stdout = p.communicate()[0]
p.wait()
return [force_text(x).split(' ', 1) for x in stdout.splitlines()]
return [force_str(x).split(' ', 1) for x in stdout.splitlines()]
def get_version_hash(self, version_number):
if re.findall(r'\.g([0-9a-f]{7})', version_number):

View File

@ -1,27 +1,27 @@
{% extends "scrutiny/base.html" %}
{% block appbar %}
<h2>Deployments of {{ module.name }}</h2>
<h2>Deployments of {{ module.name }}</h2>
{% endblock %}
{% block content %}
<div>
<div>
<dl class="deployments">
{% regroup versions by version.version as versions_list %}
{% for version in versions_list %}
<dt>{{ version.grouper }} </dt>
<dd><ul>{% for installed_version in version.list %}
<li>{{ installed_version.service.platform.project.title }}
{{ installed_version.service.platform.title }} /
{{ installed_version.service.service.title }}</li>
{% endfor %}</ul>
</dd>
{% endfor %}
</dl>
</div>
<dl class="deployments">
{% regroup versions by version.version as versions_list %}
{% for version in versions_list %}
<dt>{{ version.grouper }} </dt>
<dd><ul>{% for installed_version in version.list %}
<li>{{ installed_version.service.platform.project.title }}
{{ installed_version.service.platform.title }} /
{{ installed_version.service.service.title }}</li>
{% endfor %}</ul>
</dd>
{% endfor %}
</dl>
</div>
<p><a class="button" href="json">As JSON</a></p>
<p><a class="button" href="json">As JSON</a></p>
{% endblock %}

View File

@ -1,18 +1,18 @@
{% extends "scrutiny/base.html" %}
{% block appbar %}
<h2>{{ module.name }} - Differences between {{ commit1 }} and {{ commit2 }}</h2>
<h2>{{ module.name }} - Differences between {{ commit1 }} and {{ commit2 }}</h2>
{% endblock %}
{% block content %}
<div>
<p><a href="{{ module.repository_url }}">{{ module.repository_url }}</a></p>
<div>
<p><a href="{{ module.repository_url }}">{{ module.repository_url }}</a></p>
<pre class="difflog">
{{ difflog|safe }}
</pre>
</div>
</div>
{% endblock %}

View File

@ -1,25 +1,25 @@
{% extends "scrutiny/base.html" %}
{% block appbar %}
<h2>{{ module.name }} - Issues touched between {{ commit1 }} and {{ commit2 }}</h2>
<h2>{{ module.name }} - Issues touched between {{ commit1 }} and {{ commit2 }}</h2>
{% endblock %}
{% block content %}
<div>
<p><a href="{{ module.repository_url }}">{{ module.repository_url }}</a></p>
<div>
<p><a href="{{ module.repository_url }}">{{ module.repository_url }}</a></p>
<ul class="issue-list">
{% for issue in issues %}
<li class="{{issue.priority_class}}"><a href="{{ issue.url }}">#{{ issue.id }}: {{ issue.subject }}</a>
<ul>
{% for commit in issue.commits %}
<li><tt>{{ commit.commit_html|safe }}</tt></li>
{% endfor %}
</ul></li>
{% endfor %}
</ul>
<ul class="issue-list">
{% for issue in issues %}
<li class="{{issue.priority_class}}"><a href="{{ issue.url }}">#{{ issue.id }}: {{ issue.subject }}</a>
<ul>
{% for commit in issue.commits %}
<li><tt>{{ commit.commit_html|safe }}</tt></li>
{% endfor %}
</ul></li>
{% endfor %}
</ul>
</div>
</div>
{% endblock %}
{% block page-end %}

View File

@ -1,13 +1,13 @@
<ul class="issues">
{% for issue in issues %}
<li><a href="{{ issue.url }}">#{{ issue.id }}</a> : {{ issue.subject }}
{% spaceless %}
<span class="modules">[
{% for module in issue.modules.keys %}
{{ module }}{% if not forloop.last %}, {% endif %}
{% for issue in issues %}
<li><a href="{{ issue.url }}">#{{ issue.id }}</a> : {{ issue.subject }}
{% spaceless %}
<span class="modules">[
{% for module in issue.modules.keys %}
{{ module }}{% if not forloop.last %}, {% endif %}
{% endfor %}
]</span>
{% endspaceless %}
</li>
{% endfor %}
]</span>
{% endspaceless %}
</li>
{% endfor %}
</ul>

View File

@ -1,17 +1,17 @@
{% extends "scrutiny/base.html" %}
{% block appbar %}
<h2>Available modules</h2>
<h2>Available modules</h2>
{% endblock %}
{% block content %}
<div>
<ul>
{% for module in modules %}
<li>{{ module.name }} : <a href="{{ module.name }}/">deployments</a></li>
{% endfor %}
</ul>
</div>
<div>
<ul>
{% for module in modules %}
<li>{{ module.name }} : <a href="{{ module.name }}/">deployments</a></li>
{% endfor %}
</ul>
</div>
{% endblock %}
{% block page-end %}

View File

@ -2,85 +2,85 @@
{% load tags %}
{% block appbar %}
<h2>{{ project.title }}</h2>
<h2>{{ project.title }}</h2>
{% endblock %}
{% block content %}
<div>
<div>
<table class="installed-versions">
<thead>
<td></td>
{% for platform in platforms %}
<th>{{ platform.title }}</th>
{% endfor %}
</thead>
<tbody>
{% for service in services %}
<tr class="service">
<th>{{ service.title }}</th>
{% for platform in platforms %}
<td class="service-link"><a href="{% service_url platform=platform service=service %}"
class="icon-external-link"></a></td>
{% endfor %}
</tr>
{% for module in service.get_modules_with_version %}
<tr class="module">
<th>{{ module.0.name }}</th>
{% for platform in platforms %}
<td class="version">{{ module.1|get:platform.id|default:"" }}</td>
{% endfor %}
</tr>
{% endfor %}
{% endfor %}
</tbody>
</table>
<table class="installed-versions">
<thead>
<td></td>
{% for platform in platforms %}
<th>{{ platform.title }}</th>
{% endfor %}
</thead>
<tbody>
{% for service in services %}
<tr class="service">
<th>{{ service.title }}</th>
{% for platform in platforms %}
<td class="service-link"><a href="{% service_url platform=platform service=service %}"
class="icon-external-link"></a></td>
{% endfor %}
</tr>
{% for module in service.get_modules_with_version %}
<tr class="module">
<th>{{ module.0.name }}</th>
{% for platform in platforms %}
<td class="version">{{ module.1|get:platform.id|default:"" }}</td>
{% endfor %}
</tr>
{% endfor %}
{% endfor %}
</tbody>
</table>
</div>
</div>
<button id="diff">Diff</button>
<button id="issues">Issues</button>
<a class="button" href="{% url 'project-history' slug=project.slug %}">History</a>
<button id="diff">Diff</button>
<button id="issues">Issues</button>
<a class="button" href="{% url 'project-history' slug=project.slug %}">History</a>
{% endblock %}
{% block page-end %}
<script>
function start_diff() {
$('td.version:not(:empty)').removeClass('selected').addClass('selectable').click(function() {
$('#diff').data('commit-1', $(this).text());
$('td.version').removeClass('selectable').unbind('click');
$(this).parent().find('td.version').addClass('selectable').click(function() {
$('td.version').removeClass('selected').removeClass('selectable');
window.location = '../modules/' + $(this).parent().find('th').text() +
'/diff/' + $('#diff').data('commit-1') + '/' + $(this).text();
});
$(this).addClass('selected').removeClass('selectable').unbind('click');
});
}
function start_issues() {
$('td.version:not(:empty)').removeClass('selected').addClass('selectable').click(function() {
$('#issues').data('commit-1', $(this).text());
$('td.version').removeClass('selectable').unbind('click');
$(this).parent().find('td.version').addClass('selectable').click(function() {
$('td.version').removeClass('selected').removeClass('selectable');
window.location = '../modules/' + $(this).parent().find('th').text() +
'/issues/' + $('#issues').data('commit-1') + '/' + $(this).text();
});
$(this).addClass('selected').removeClass('selectable').unbind('click');
});
}
$(function() {
$('#diff').click(start_diff);
$('#issues').click(start_issues);
$('td.version').each(function() {
if ($(this).text() == $(this).next().text()) {
$(this).addClass('dim');
<script>
function start_diff() {
$('td.version:not(:empty)').removeClass('selected').addClass('selectable').click(function() {
$('#diff').data('commit-1', $(this).text());
$('td.version').removeClass('selectable').unbind('click');
$(this).parent().find('td.version').addClass('selectable').click(function() {
$('td.version').removeClass('selected').removeClass('selectable');
window.location = '../modules/' + $(this).parent().find('th').text() +
'/diff/' + $('#diff').data('commit-1') + '/' + $(this).text();
});
$(this).addClass('selected').removeClass('selectable').unbind('click');
});
}
});
});
</script>
function start_issues() {
$('td.version:not(:empty)').removeClass('selected').addClass('selectable').click(function() {
$('#issues').data('commit-1', $(this).text());
$('td.version').removeClass('selectable').unbind('click');
$(this).parent().find('td.version').addClass('selectable').click(function() {
$('td.version').removeClass('selected').removeClass('selectable');
window.location = '../modules/' + $(this).parent().find('th').text() +
'/issues/' + $('#issues').data('commit-1') + '/' + $(this).text();
});
$(this).addClass('selected').removeClass('selectable').unbind('click');
});
}
$(function() {
$('#diff').click(start_diff);
$('#issues').click(start_issues);
$('td.version').each(function() {
if ($(this).text() == $(this).next().text()) {
$(this).addClass('dim');
}
});
});
</script>
{% endblock %}

View File

@ -2,88 +2,88 @@
{% load tags %}
{% block appbar %}
<h2>{{ project.title }} — Detailed History</h2>
<h2>{{ project.title }} — Detailed History</h2>
{% endblock %}
{% block content %}
<div>
<div>
<table class="history">
<thead>
<tr>
<th>Platform</th> <th>Service</th> <th>Datetime</th> <th>Module</th>
<th>Old version →</th> <th>New version</th>
</tr>
</thead>
<tbody>
{% for v in installed_versions %}
<tr class="
{% if not v.version.version %}uninstall{% endif %}
">
<td class="platform">{{ v.service.platform.title }}</td>
<td class="service">{{ v.service.service.title }}</td>
<td class="datetime">{{ v.timestamp }}</td>
<td class="module">{{ v.version.module.name }}</td>
<td class="version">{{ v.get_previous_version.version.version }}</td>
<td class="version">{{ v.version.version }}</td>
</tr>
{% endfor %}
</tbody>
</table>
<table class="history">
<thead>
<tr>
<th>Platform</th> <th>Service</th> <th>Datetime</th> <th>Module</th>
<th>Old version →</th> <th>New version</th>
</tr>
</thead>
<tbody>
{% for v in installed_versions %}
<tr class="
{% if not v.version.version %}uninstall{% endif %}
">
<td class="platform">{{ v.service.platform.title }}</td>
<td class="service">{{ v.service.service.title }}</td>
<td class="datetime">{{ v.timestamp }}</td>
<td class="module">{{ v.version.module.name }}</td>
<td class="version">{{ v.get_previous_version.version.version }}</td>
<td class="version">{{ v.version.version }}</td>
</tr>
{% endfor %}
</tbody>
</table>
</div>
</div>
<div class="buttons">
<button id="diff">Diff</button>
<button id="issues">Issues</button>
</div>
<div class="buttons">
<button id="diff">Diff</button>
<button id="issues">Issues</button>
</div>
<p class="note">
Note: It is possible to click on cell content to filter on that value.
</p>
<p class="note">
Note: It is possible to click on cell content to filter on that value.
</p>
{% endblock %}
{% block page-end %}
<script>
function start_diff() {
$('td.version:not(:empty)').removeClass('selected').addClass('selectable').click(function() {
$('#diff').data('commit-1', $(this).text());
$('td.version').removeClass('selectable').unbind('click');
$(this).parent().find('td.version').addClass('selectable').click(function() {
$('td.version').removeClass('selected').removeClass('selectable');
window.location = '../modules/' + $(this).parent().find('td.module').text() +
'/diff/' + $('#diff').data('commit-1') + '/' + $(this).text();
});
$(this).addClass('selected').removeClass('selectable').unbind('click');
});
}
<script>
function start_diff() {
$('td.version:not(:empty)').removeClass('selected').addClass('selectable').click(function() {
$('#diff').data('commit-1', $(this).text());
$('td.version').removeClass('selectable').unbind('click');
$(this).parent().find('td.version').addClass('selectable').click(function() {
$('td.version').removeClass('selected').removeClass('selectable');
window.location = '../modules/' + $(this).parent().find('td.module').text() +
'/diff/' + $('#diff').data('commit-1') + '/' + $(this).text();
});
$(this).addClass('selected').removeClass('selectable').unbind('click');
});
}
function start_issues() {
$('td.version:not(:empty)').removeClass('selected').addClass('selectable').click(function() {
$('#issues').data('commit-1', $(this).text());
$('td.version').removeClass('selectable').unbind('click');
$(this).parent().find('td.version').addClass('selectable').click(function() {
$('td.version').removeClass('selected').removeClass('selectable');
window.location = '../modules/' + $(this).parent().find('td.module').text() +
'/issues/' + $('#issues').data('commit-1') + '/' + $(this).text();
});
$(this).addClass('selected').removeClass('selectable').unbind('click');
});
}
function start_issues() {
$('td.version:not(:empty)').removeClass('selected').addClass('selectable').click(function() {
$('#issues').data('commit-1', $(this).text());
$('td.version').removeClass('selectable').unbind('click');
$(this).parent().find('td.version').addClass('selectable').click(function() {
$('td.version').removeClass('selected').removeClass('selectable');
window.location = '../modules/' + $(this).parent().find('td.module').text() +
'/issues/' + $('#issues').data('commit-1') + '/' + $(this).text();
});
$(this).addClass('selected').removeClass('selectable').unbind('click');
});
}
$(function() {
$('#diff').click(start_diff);
$('#issues').click(start_issues);
$('table tbody td').click(function() {
var value = $(this).text();
var index = $(this).index();
$('td.platform, td.service, td.datetime, td.module').each(function(idx, elem) {
if ($(this).text() !== value && $(this).index() == index) {
$(this).parents('tr').hide();
}
$(function() {
$('#diff').click(start_diff);
$('#issues').click(start_issues);
$('table tbody td').click(function() {
var value = $(this).text();
var index = $(this).index();
$('td.platform, td.service, td.datetime, td.module').each(function(idx, elem) {
if ($(this).text() !== value && $(this).index() == index) {
$(this).parents('tr').hide();
}
});
});
});
});
});
</script>
</script>
{% endblock %}

View File

@ -2,62 +2,62 @@
{% load tags %}
{% block appbar %}
<h2>{{ project.title }} — {{ platform.title }}</h2>
<h2>{{ project.title }} — {{ platform.title }}</h2>
{% endblock %}
{% block content %}
<div id="history-summary">
{% for day in history %}
<div data-issues-url-content="{% url 'issues-snippet' %}">
{% if day.modules %}
<h3>{{ day.day|date:"d/m/Y" }}{% if day.day == 'future' %}À venir{% endif %}</h3>
<p>
{% for module in day.modules.values %}
<span data-module-name="{{ module.name }}"
data-previous-version="{{ module.previous_version }}"
data-current-version="{{ module.current_version }}"
>{{ module.name }} ({{module.previous_version}} → {{module.current_version}})
</span>
{% if not forloop.last %}, {%endif %}
{% endfor %}
<ul class="issues loading">
<li><i>(récupération des tickets en cours)</i></li>
</ul>
{% endif %}
</div>
{% endfor %}
<div id="history-summary">
{% for day in history %}
<div data-issues-url-content="{% url 'issues-snippet' %}">
{% if day.modules %}
<h3>{{ day.day|date:"d/m/Y" }}{% if day.day == 'future' %}À venir{% endif %}</h3>
<p>
{% for module in day.modules.values %}
<span data-module-name="{{ module.name }}"
data-previous-version="{{ module.previous_version }}"
data-current-version="{{ module.current_version }}"
>{{ module.name }} ({{module.previous_version}} → {{module.current_version}})
</span>
{% if not forloop.last %}, {%endif %}
{% endfor %}
<ul class="issues loading">
<li><i>(récupération des tickets en cours)</i></li>
</ul>
{% endif %}
</div>
{% endfor %}
</div>
</div>
{% endblock %}
{% block page-end %}
<script>
$(function() {
$('[data-issues-url-content]').each(function(idx, elem) {
var ul_issues = $(elem).find('ul.issues');
var url = $(elem).data('issues-url-content');
var modules = Object();
$(elem).find('[data-module-name]').each(function(idx2, elem2) {
var mod = Object();
mod.name = $(elem2).data('module-name');
mod.previous_version = $(elem2).data('previous-version');
mod.current_version = $(elem2).data('current-version');
modules[mod.name] = mod;
<script>
$(function() {
$('[data-issues-url-content]').each(function(idx, elem) {
var ul_issues = $(elem).find('ul.issues');
var url = $(elem).data('issues-url-content');
var modules = Object();
$(elem).find('[data-module-name]').each(function(idx2, elem2) {
var mod = Object();
mod.name = $(elem2).data('module-name');
mod.previous_version = $(elem2).data('previous-version');
mod.current_version = $(elem2).data('current-version');
modules[mod.name] = mod;
});
$.ajax({
url: url,
type: 'POST',
contentType: 'application/json',
data: JSON.stringify(modules),
dataType: 'html',
success: function(data) {
$(ul_issues).replaceWith(data);
}
});
});
});
$.ajax({
url: url,
type: 'POST',
contentType: 'application/json',
data: JSON.stringify(modules),
dataType: 'html',
success: function(data) {
$(ul_issues).replaceWith(data);
}
});
});
});
</script>
</script>
{% endblock %}

View File

@ -1,4 +1,4 @@
from django.conf.urls import url
from django.urls import path, re_path
from .views import (
IssuesSnippet,
@ -14,22 +14,24 @@ from .views import (
)
urlpatterns = [
url(r'^modules/$', ModulesView.as_view(), name='modules-list'),
url(r'^(?P<slug>[\w,-]+)/$', ProjectDetailView.as_view(), name='project-view'),
url(r'^(?P<slug>[\w,-]+)/history$', ProjectSummaryHistoryView.as_view(), name='project-summary-history'),
url(r'^(?P<slug>[\w,-]+)/detailed-history$', ProjectHistoryView.as_view(), name='project-history'),
url(
path('modules/', ModulesView.as_view(), name='modules-list'),
re_path(r'^(?P<slug>[\w,-]+)/$', ProjectDetailView.as_view(), name='project-view'),
re_path(
r'^(?P<slug>[\w,-]+)/history$', ProjectSummaryHistoryView.as_view(), name='project-summary-history'
),
re_path(r'^(?P<slug>[\w,-]+)/detailed-history$', ProjectHistoryView.as_view(), name='project-history'),
re_path(
r'^modules/(?P<name>[\w,-]+)/diff/(?P<commit1>[\w,\.-]+)/(?P<commit2>[\w,\.-]+)$',
ModuleDiffView.as_view(),
name='module-diff',
),
url(r'^issues/snippet/$', IssuesSnippet.as_view(), name='issues-snippet'),
url(
path('issues/snippet/', IssuesSnippet.as_view(), name='issues-snippet'),
re_path(
r'^modules/(?P<name>[\w,-]+)/issues/(?P<commit1>[\w,\.-]+)/(?P<commit2>[\w,\.-]+)$',
ModuleIssuesView.as_view(),
name='module-issues',
),
url(r'^modules/(?P<name>[\w,-]+)/$', ModuleDeploymentsView.as_view(), name='module-deployments'),
url(r'^modules/(?P<name>[\w,-]+)/json$', module_deployments_json, name='module-deployments-json'),
url(r'^api/issues/(?P<issue>\d+)/$', api_issues_json),
re_path(r'^modules/(?P<name>[\w,-]+)/$', ModuleDeploymentsView.as_view(), name='module-deployments'),
re_path(r'^modules/(?P<name>[\w,-]+)/json$', module_deployments_json, name='module-deployments-json'),
path('api/issues/<int:issue>/', api_issues_json),
]

View File

@ -3,7 +3,7 @@ import re
import requests
from django.conf import settings
from django.core.cache import cache
from django.utils.encoding import force_text
from django.utils.encoding import force_str
CACHE_DURATION = 3600
@ -101,7 +101,7 @@ def get_issue_deployment_status(issue_id):
continue
git_log_hashes = [x[0][:7] for x in git_log]
for line in git_log:
if not force_text(line[1], 'utf-8', 'ignore').endswith('#%s)' % issue_id):
if not force_str(line[1], 'utf-8', 'ignore').endswith('#%s)' % issue_id):
continue
commit_hash = line[0][:7]
fix_index = git_log_hashes.index(commit_hash)

View File

@ -2,9 +2,9 @@
{% load gadjo i18n %}
{% block content %}
<form method="post">
{% csrf_token %}
{{ form|as_template }}
<input type="submit" value="{% trans 'Log in' %}" />
</form>
<form method="post">
{% csrf_token %}
{{ form|as_template }}
<input type="submit" value="{% trans 'Log in' %}" />
</form>
{% endblock %}

View File

@ -2,18 +2,18 @@
{% load i18n %}
{% block page-title %}
Scrutiny
Scrutiny
{% endblock %}
{% block header %}
{{ block.super }}
{{ block.super }}
{% endblock %}
{% block extrascripts %}
<script src="{{ STATIC_URL}}js/konami.js"></script>
<script>
var konami = new Konami('http://en.wikipedia.org/wiki/New_Maps_of_Hell');
</script>
<script src="{{ STATIC_URL}}js/konami.js"></script>
<script>
var konami = new Konami('http://en.wikipedia.org/wiki/New_Maps_of_Hell');
</script>
{% endblock %}
{% block appbar %}
@ -21,25 +21,25 @@ var konami = new Konami('http://en.wikipedia.org/wiki/New_Maps_of_Hell');
{% endblock %}
{% block content %}
<div>
<div>
<p>
{% blocktrans %}
Scrutiny provides a view over the different platforms of our projects.
{% endblocktrans %}
</p>
<p>
{% blocktrans %}
Scrutiny provides a view over the different platforms of our projects.
{% endblocktrans %}
</p>
<ul>
{% for project in projects %}
<li><a href="{% url 'project-view' slug=project.slug %}">{{ project.title }}</a>
(<a href="{% url 'project-summary-history' slug=project.slug %}">historique des mises à jour</a>)
</li>
{% endfor %}
</ul>
<ul>
{% for project in projects %}
<li><a href="{% url 'project-view' slug=project.slug %}">{{ project.title }}</a>
(<a href="{% url 'project-summary-history' slug=project.slug %}">historique des mises à jour</a>)
</li>
{% endfor %}
</ul>
<p>
A list of <a href="{% url 'modules-list' %}">all tracked modules</a> is available.
</p>
<p>
A list of <a href="{% url 'modules-list' %}">all tracked modules</a> is available.
</p>
</div>
</div>
{% endblock %}

View File

@ -1,8 +1,8 @@
from django.conf import settings
from django.conf.urls import include, url
from django.conf.urls.static import static
from django.contrib import admin
from django.contrib.staticfiles.urls import staticfiles_urlpatterns
from django.urls import include, path, re_path
import scrutiny.views
from scrutiny.projects.urls import urlpatterns as projects_urls
@ -10,15 +10,15 @@ from scrutiny.projects.urls import urlpatterns as projects_urls
admin.autodiscover()
urlpatterns = [
url(r'^$', scrutiny.views.home, name='home'),
url(r'^projects/', include(projects_urls)),
url(r'^admin/', admin.site.urls),
url(r'^logout/$', scrutiny.views.logout, name='auth_logout'),
url(r'^login/$', scrutiny.views.login, name='auth_login'),
path('', scrutiny.views.home, name='home'),
re_path(r'^projects/', include(projects_urls)),
re_path(r'^admin/', admin.site.urls),
path('logout/', scrutiny.views.logout, name='auth_logout'),
path('login/', scrutiny.views.login, name='auth_login'),
]
urlpatterns += staticfiles_urlpatterns()
urlpatterns += static(settings.MEDIA_URL, document_root=settings.MEDIA_ROOT)
if 'mellon' in settings.INSTALLED_APPS:
urlpatterns.append(url(r'^accounts/mellon/', include('mellon.urls')))
urlpatterns.append(re_path(r'^accounts/mellon/', include('mellon.urls')))