diff --git a/conservancy/usethesource/admin.py b/conservancy/usethesource/admin.py index 8d131dc1..6a886813 100644 --- a/conservancy/usethesource/admin.py +++ b/conservancy/usethesource/admin.py @@ -22,6 +22,7 @@ class CandidateAdmin(admin.ModelAdmin): 'release_date', 'source_url', 'binary_url', + 'show_download_disclaimer', 'description', ] inlines = [CommentInline] diff --git a/conservancy/usethesource/migrations/0007_candidate_show_download_disclaimer.py b/conservancy/usethesource/migrations/0007_candidate_show_download_disclaimer.py new file mode 100644 index 00000000..cb15982d --- /dev/null +++ b/conservancy/usethesource/migrations/0007_candidate_show_download_disclaimer.py @@ -0,0 +1,18 @@ +# Generated by Django 3.2.19 on 2024-03-15 03:25 + +from django.db import migrations, models + + +class Migration(migrations.Migration): + + dependencies = [ + ('usethesource', '0006_alter_comment_time'), + ] + + operations = [ + migrations.AddField( + model_name='candidate', + name='show_download_disclaimer', + field=models.BooleanField(default=True), + ), + ] diff --git a/conservancy/usethesource/models.py b/conservancy/usethesource/models.py index 2edb1206..8de4e74a 100644 --- a/conservancy/usethesource/models.py +++ b/conservancy/usethesource/models.py @@ -22,6 +22,7 @@ class Candidate(models.Model): description = models.TextField(blank=True) source_url = models.URLField() binary_url = models.URLField(blank=True) + show_download_disclaimer = models.BooleanField(default=True) ordering = models.SmallIntegerField(default=0) email_message_id = models.CharField(max_length=255, default=gen_message_id) diff --git a/conservancy/usethesource/templates/usethesource/candidate.html b/conservancy/usethesource/templates/usethesource/candidate.html index d38444bc..b31a11f2 100644 --- a/conservancy/usethesource/templates/usethesource/candidate.html +++ b/conservancy/usethesource/templates/usethesource/candidate.html @@ -23,8 +23,19 @@
Released: {{ candidate.release_date }}