diff options
Diffstat (limited to 'app/posts/models.py')
-rw-r--r-- | app/posts/models.py | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/app/posts/models.py b/app/posts/models.py index 9697f27..1dafa1a 100644 --- a/app/posts/models.py +++ b/app/posts/models.py @@ -46,7 +46,7 @@ class PostType(models.IntegerChoices): JRNL = 4, ('jrnl') FIELD_NOTE = 5, ('field note') GUIDE = 6, ('guide') - FRIENDS = 7, ('friends') + FILM = 7, ('film') class Post(models.Model): @@ -104,6 +104,8 @@ class Post(models.Model): return self.title def get_absolute_url(self): + if self.post_type == PostType.FILM: + return reverse('essays:detail', kwargs={"slug": self.slug}) if self.post_type == PostType.ESSAY: return reverse('essays:detail', kwargs={"slug": self.slug}) if self.post_type == PostType.RANGE: |