This commit is contained in:
Ross
2022-03-25 21:38:12 +00:00
parent db30742f4d
commit 6500428cd9
5 changed files with 569 additions and 520 deletions
+10
View File
@@ -78,6 +78,12 @@ class SynMixin(object):
# abstract = True
def __str__(self) -> str:
if self.primary:
return self.name
else:
return f"{self.name} [syn]"
def get_old_str(self) -> str:
if self.primary:
if self.synonym.count() == 0:
return self.name
@@ -559,6 +565,10 @@ class CaseCollection(models.Model):
help_text="If a collection should be freely available to browse", default=True
)
show_title = models.BooleanField(default=False, help_text="Show the title of the cases")
show_description = models.BooleanField(default=False, help_text="Show the description of the cases")
show_discussion = models.BooleanField(default=False, help_text="Show the case discussion")
def get_absolute_url(self):
return reverse("atlas:collection_detail_view", kwargs={"pk": self.pk})