aboutsummaryrefslogtreecommitdiffstats
path: root/ctrack/caf/models.py
diff options
context:
space:
mode:
authorMatthew Lemon <lemon@matthewlemon.com>2020-04-15 20:11:46 +0100
committerMatthew Lemon <lemon@matthewlemon.com>2020-04-15 20:11:46 +0100
commit82fa2dabf282971a81ee16858aa5513c51cb7d56 (patch)
treef9fec8c16b55cf887d16b03b8b31593ad1363b2d /ctrack/caf/models.py
parentba1b0f411a6f624e1ebf00c772f25a2dc8479e0c (diff)
part way through caf create page but this page needs a formset
Diffstat (limited to 'ctrack/caf/models.py')
-rw-r--r--ctrack/caf/models.py5
1 files changed, 5 insertions, 0 deletions
diff --git a/ctrack/caf/models.py b/ctrack/caf/models.py
index bec59d6..78ebda7 100644
--- a/ctrack/caf/models.py
+++ b/ctrack/caf/models.py
@@ -2,6 +2,7 @@ from django.db import models
from ctrack.caf.managers import ApplicableSystemManager
from ctrack.organisations.models import Organisation, Person
+from django.urls.base import reverse
class Grading(models.Model):
@@ -78,6 +79,10 @@ class CAF(models.Model):
class Meta:
verbose_name = "CAF"
+
+ def get_absolute_url(self):
+ return reverse("caf:detail", kwargs={"pk": self.pk})
+
def __str__(self):
# Get the organisation and applicable system