File tree Expand file tree Collapse file tree 2 files changed +10
-0
lines changed Expand file tree Collapse file tree 2 files changed +10
-0
lines changed Original file line number Diff line number Diff line change @@ -8,6 +8,11 @@ def strip_minor_version(version):
8
8
return '.'.join(version.split('.')[:2])
9
9
10
10
11
+ @register.filter
12
+ def has_gpg(files: list) -> bool:
13
+ return any(f.gpg_signature_file for f in files)
14
+
15
+
11
16
@register.filter
12
17
def has_sigstore_materials(files):
13
18
return any(
Original file line number Diff line number Diff line change 1
1
{% extends "base.html" %}
2
2
{% load boxes %}
3
3
{% load sitetree %}
4
+ {% load has_gpg from download_tags %}
4
5
{% load has_sigstore_materials from download_tags %}
5
6
{% load has_sbom from download_tags %}
6
7
{% load sort_windows from download_tags %}
@@ -51,7 +52,9 @@ <h1 class="page-title">Files</h1>
51
52
<th>Description</th>
52
53
<th>MD5 Sum</th>
53
54
<th>File Size</th>
55
+ {% if release_files|has_gpg %}
54
56
<th>GPG</th>
57
+ {% endif %}
55
58
{% if release_files|has_sigstore_materials %}
56
59
<th colspan="2"><a href="https://www.python.org/download/sigstore/">Sigstore</a></th>
57
60
{% endif %}
@@ -68,7 +71,9 @@ <h1 class="page-title">Files</h1>
68
71
<td>{{ f.description }}</td>
69
72
<td>{{ f.md5_sum }}</td>
70
73
<td>{{ f.filesize|filesizeformat }}</td>
74
+ {% if release_files|has_gpg %}
71
75
<td>{% if f.gpg_signature_file %}<a href="{{ f.gpg_signature_file }}">SIG</a>{% endif %}</td>
76
+ {% endif %}
72
77
{% if release_files|has_sigstore_materials %}
73
78
{% if f.sigstore_bundle_file %}
74
79
<td colspan="2">{% if f.sigstore_bundle_file %}<a href="{{ f.sigstore_bundle_file}}">.sigstore</a>{% endif %}</td>
You can’t perform that action at this time.
0 commit comments