diff --git a/ram/metadata/admin.py b/ram/metadata/admin.py index 1ba1b6c..7f4970e 100644 --- a/ram/metadata/admin.py +++ b/ram/metadata/admin.py @@ -15,6 +15,7 @@ @admin.register(Property) class PropertyAdmin(admin.ModelAdmin): + list_display = ("name", "private") search_fields = ("name",) diff --git a/ram/metadata/migrations/0013_decoderdocument_private.py b/ram/metadata/migrations/0013_decoderdocument_private.py new file mode 100644 index 0000000..af62945 --- /dev/null +++ b/ram/metadata/migrations/0013_decoderdocument_private.py @@ -0,0 +1,18 @@ +# Generated by Django 4.2.5 on 2023-10-06 19:48 + +from django.db import migrations, models + + +class Migration(migrations.Migration): + + dependencies = [ + ("metadata", "0012_alter_decoder_manufacturer_decoderdocument"), + ] + + operations = [ + migrations.AddField( + model_name="decoderdocument", + name="private", + field=models.BooleanField(default=False), + ), + ] diff --git a/ram/portal/models.py b/ram/portal/models.py index be84623..7305f8e 100644 --- a/ram/portal/models.py +++ b/ram/portal/models.py @@ -66,12 +66,11 @@ def get_absolute_url(self): return reverse("flatpage", kwargs={"flatpage": self.path}) def get_link(self): - if self.published: - return mark_safe( - 'Link'.format( - self.get_absolute_url() - ) + return mark_safe( + 'Link'.format( + self.get_absolute_url() ) + ) @receiver(models.signals.pre_save, sender=Flatpage) diff --git a/ram/portal/templates/cards/rolling_stock.html b/ram/portal/templates/cards/rolling_stock.html index d69acaf..f82db4c 100644 --- a/ram/portal/templates/cards/rolling_stock.html +++ b/ram/portal/templates/cards/rolling_stock.html @@ -1,7 +1,7 @@ {% load static %}