diff options
Diffstat (limited to 'app/jrnl/models.py')
-rw-r--r-- | app/jrnl/models.py | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/app/jrnl/models.py b/app/jrnl/models.py index da953de..a918f6e 100644 --- a/app/jrnl/models.py +++ b/app/jrnl/models.py @@ -152,11 +152,22 @@ class Entry(models.Model): @property def get_previous_published(self): return self.get_previous_by_pub_date(status__exact=1) + + @property + def get_previous_admin_url(self): + n = self.get_previous_by_pub_date() + return "/admin/jrnl/entry/%s/change/" % n.pk + @property def get_next_published(self): return self.get_next_by_pub_date(status__exact=1) + @property + def get_next_admin_url(self): + n = self.get_next_by_pub_date() + return "/admin/jrnl/entry/%s/change/" % n.pk + def save(self): if self.pk: if self.pk >= 167 or self.pk == 129: |