diff --git a/server/core/migrations/0018_device_visible.py b/server/core/migrations/0018_device_visible.py new file mode 100644 index 00000000..40ee0d81 --- /dev/null +++ b/server/core/migrations/0018_device_visible.py @@ -0,0 +1,19 @@ +# Generated by Django 4.2.7 on 2024-02-09 18:53 + +from django.db import migrations, models + + +class Migration(migrations.Migration): + dependencies = [ + ("core", "0017_build_x86_type"), + ] + + operations = [ + migrations.AddField( + model_name="device", + name="visible", + field=models.BooleanField( + default=True, help_text="Show device on the main downloads page" + ), + ), + ] diff --git a/server/core/models.py b/server/core/models.py index 3712d34b..9fc35e62 100644 --- a/server/core/models.py +++ b/server/core/models.py @@ -60,6 +60,10 @@ def get_image_upload_path(self, filename): ) created = models.DateTimeField(auto_now_add=True, editable=False) + visible = models.BooleanField( + default=True, help_text="Show device on the main downloads page" + ) + def __str__(self): return "{} {} ({})".format(self.manufacturer, self.name, self.codename)