diff --git a/downloads/templatetags/download_tags.py b/downloads/templatetags/download_tags.py index c72f6d58c..f61f25ada 100644 --- a/downloads/templatetags/download_tags.py +++ b/downloads/templatetags/download_tags.py @@ -8,6 +8,11 @@ def strip_minor_version(version): return '.'.join(version.split('.')[:2]) +@register.filter +def has_gpg(files: list) -> bool: + return any(f.gpg_signature_file for f in files) + + @register.filter def has_sigstore_materials(files): return any( diff --git a/templates/downloads/release_detail.html b/templates/downloads/release_detail.html index 720887074..0ddcde32a 100644 --- a/templates/downloads/release_detail.html +++ b/templates/downloads/release_detail.html @@ -1,6 +1,7 @@ {% extends "base.html" %} {% load boxes %} {% load sitetree %} +{% load has_gpg from download_tags %} {% load has_sigstore_materials from download_tags %} {% load has_sbom from download_tags %} {% load sort_windows from download_tags %} @@ -51,7 +52,9 @@