diff options
Diffstat (limited to 'app/posts/models.py')
-rw-r--r-- | app/posts/models.py | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/app/posts/models.py b/app/posts/models.py index 93d686a..2ad995d 100644 --- a/app/posts/models.py +++ b/app/posts/models.py @@ -145,6 +145,8 @@ class Post(models.Model): return reverse('src:detail', kwargs={"slug": self.slug}) if self.post_type == PostType.FIELD_NOTE: return reverse('fieldnote:detail', kwargs={"year": self.pub_date.year, "month": self.pub_date.strftime("%m"), "slug": self.slug}) + if self.post_type == PostType.GUIDE: + return reverse('guides:guide-detail', kwargs={"topic": str(self.topics.all()[0]).lower(), "slug": self.slug}) if self.post_type == PostType.JRNL: return reverse('jrnl:detail', kwargs={"year": self.pub_date.year, "month": self.pub_date.strftime("%m"), "slug": self.slug}) |