This commit is contained in:
Ross
2022-03-31 22:31:19 +01:00
parent a1010b0318
commit 15971a867c
3 changed files with 53 additions and 2 deletions
+8 -2
View File
@@ -564,8 +564,8 @@ class CaseCollection(models.Model):
cases = models.ManyToManyField(Case, through="CaseDetail")
open_access = models.BooleanField(
help_text="If a collection should be freely available to browse", default=True
published = models.BooleanField(
help_text="If a collection should published", default=True
)
show_title = models.BooleanField(default=False, help_text="Show the title of the cases")
@@ -580,6 +580,12 @@ class CaseCollection(models.Model):
#related_name="atlas_authored_cases",
)
class COLLECTION_TYPE_CHOICES(models.TextChoices):
REVIEW = "RE", _("Review"),
BASIC_TEXT_INPUT = "BTI", _("Basic Text Input"),
collection_type = models.CharField(max_length=3, choices=COLLECTION_TYPE_CHOICES.choices, default=COLLECTION_TYPE_CHOICES.REVIEW)
def get_absolute_url(self):
return reverse("atlas:collection_detail_view", kwargs={"pk": self.pk})