From b474d9c2b3fdd4bda6f0247f3afe22fc0c319b54 Mon Sep 17 00:00:00 2001 From: Ross Date: Sun, 5 Dec 2021 16:04:21 +0000 Subject: [PATCH] . --- atlas/models.py | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/atlas/models.py b/atlas/models.py index b143cd4d..94bfa81e 100644 --- a/atlas/models.py +++ b/atlas/models.py @@ -95,6 +95,8 @@ class Finding(SynMixin, models.Model): primary = models.BooleanField(default="True") + def get_absolute_url(self): + return reverse("atlas:finding_detail", kwargs={"pk": self.pk}) class Condition(SynMixin, models.Model): name = models.CharField(max_length=255, unique=True) @@ -105,6 +107,8 @@ class Condition(SynMixin, models.Model): subspecialty = models.ManyToManyField("subspecialty", blank=True) + def get_absolute_url(self): + return reverse("atlas:condition_detail", kwargs={"pk": self.pk}) class Subspecialty(models.Model): name = models.CharField(max_length=255) @@ -112,6 +116,8 @@ class Subspecialty(models.Model): def __str__(self) -> str: return self.name + def get_absolute_url(self): + return reverse("atlas:subspecialty_detail", kwargs={"pk": self.pk}) class Differential(models.Model): condition = models.ForeignKey(Condition, on_delete=models.CASCADE)