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 6179fbe..ba578b8 100644 --- a/app/posts/models.py +++ b/app/posts/models.py @@ -135,6 +135,8 @@ class Post(models.Model): return self.title def get_absolute_url(self): + if self.post_type == PostType.PHOTO_ESSAY: + return reverse('photo_essay:detail', kwargs={"slug": self.slug}) if self.post_type == PostType.ESSAY: return reverse('essays:detail', kwargs={"cat": self.get_post_topic_display(), "slug": self.slug}) if self.post_type == PostType.SRC: |