aboutsummaryrefslogtreecommitdiff
path: root/apps/notes/models.py
diff options
context:
space:
mode:
authorluxagraf <sng@luxagraf.net>2018-11-29 16:57:26 -0600
committerluxagraf <sng@luxagraf.net>2018-11-29 16:57:26 -0600
commit4974eb58480f413c67f5f6e8fac430186eda2b62 (patch)
tree7402ecba682dbda38db4b6db221cc8378a390977 /apps/notes/models.py
parent0c2a092e8d8ad33a1c306ee9efca0da96eb56415 (diff)
uploading all recent changes ahead of sys upgrade
Diffstat (limited to 'apps/notes/models.py')
-rw-r--r--apps/notes/models.py4
1 files changed, 4 insertions, 0 deletions
diff --git a/apps/notes/models.py b/apps/notes/models.py
index 83766a9..c0b23ce 100644
--- a/apps/notes/models.py
+++ b/apps/notes/models.py
@@ -33,6 +33,10 @@ class Notebook(models.Model):
self.slug = unique_slug_generator(self)
super(Notebook, self).save()
+ @cached_property
+ def get_absolute_url(self):
+ return reverse("notes:notebook-detail", kwargs={"user": self.owner.username, "slug": self.slug})
+
class Note(models.Model):
unique_id = models.UUIDField(default=uuid.uuid4, editable=False)