diff options
author | luxagraf <sng@luxagraf.net> | 2023-05-06 11:50:00 -0400 |
---|---|---|
committer | luxagraf <sng@luxagraf.net> | 2023-05-06 11:51:38 -0400 |
commit | d674d75c68c3aa65b0f9bb40c512ea8f4f657377 (patch) | |
tree | 504bfe2acccaad39adf16d9a7e541c12a5ffccfe /app/posts/models.py | |
parent | d6681ccdb385473f11fdd915e4ba61ef9c81f678 (diff) |
jrnl: added a film category (repurposed friends)
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: |