diff --git a/downloads/api.py b/downloads/api.py index 73eb9b7bf..ea32421bc 100644 --- a/downloads/api.py +++ b/downloads/api.py @@ -68,7 +68,7 @@ class Meta(GenericResource.Meta): 'name', 'slug', 'creator', 'last_modified_by', 'os', 'release', 'description', 'is_source', 'url', 'gpg_signature_file', - 'md5_sum', 'filesize', 'download_button', 'sigstore_signature_file', + 'md5_sum', 'sha256_sum', 'filesize', 'download_button', 'sigstore_signature_file', 'sigstore_cert_file', 'sigstore_bundle_file', 'sbom_spdx2_file', ] filtering = { diff --git a/downloads/migrations/0014_releasefile_sha256_sum.py b/downloads/migrations/0014_releasefile_sha256_sum.py new file mode 100644 index 000000000..0aed813c2 --- /dev/null +++ b/downloads/migrations/0014_releasefile_sha256_sum.py @@ -0,0 +1,18 @@ +# Generated by Django 4.2.26 on 2025-11-27 16:45 + +from django.db import migrations, models + + +class Migration(migrations.Migration): + + dependencies = [ + ('downloads', '0013_alter_release_content_markup_type'), + ] + + operations = [ + migrations.AddField( + model_name='releasefile', + name='sha256_sum', + field=models.CharField(blank=True, max_length=200, verbose_name='SHA256 Sum'), + ), + ] diff --git a/downloads/models.py b/downloads/models.py index fb651c29a..0a0d0e525 100644 --- a/downloads/models.py +++ b/downloads/models.py @@ -360,6 +360,7 @@ class ReleaseFile(ContentManageable, NameSlugModel): "SPDX-2 SBOM URL", blank=True, help_text="SPDX-2 SBOM URL" ) md5_sum = models.CharField('MD5 Sum', max_length=200, blank=True) + sha256_sum = models.CharField('SHA256 Sum', max_length=200, blank=True) filesize = models.IntegerField(default=0) download_button = models.BooleanField(default=False, help_text="Use for the supernav download button for this OS") diff --git a/downloads/serializers.py b/downloads/serializers.py index 1ff57049f..29c95593d 100644 --- a/downloads/serializers.py +++ b/downloads/serializers.py @@ -43,6 +43,7 @@ class Meta: 'url', 'gpg_signature_file', 'md5_sum', + 'sha256_sum', 'filesize', 'download_button', 'resource_uri',