diff options
Diffstat (limited to 'app/posts/models.py')
-rw-r--r-- | app/posts/models.py | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/app/posts/models.py b/app/posts/models.py index 11ad509..80153e0 100644 --- a/app/posts/models.py +++ b/app/posts/models.py @@ -73,7 +73,6 @@ class PostType(models.IntegerChoices): SRC = 3, ('src') JRNL = 4, ('jrnl') FIELD_NOTE = 5, ('field note') - FILM = 7, ('film') class PostTopic(models.IntegerChoices): @@ -85,7 +84,6 @@ class PostTopic(models.IntegerChoices): class Post(models.Model): site = models.ForeignKey(Site, on_delete=models.SET_NULL, default=1, null=True) title = models.CharField(max_length=200,help_text="49 characters is ideal for essays") - short_title = models.CharField(max_length=200, blank=True, null=True) subtitle = models.CharField(max_length=200, blank=True) slug = models.SlugField(unique_for_date='pub_date') prologue_markdown = models.TextField(blank=True, null=True) @@ -98,12 +96,17 @@ class Post(models.Model): meta_description = models.CharField(max_length=256, blank=True) pub_date = models.DateTimeField('Date published') last_updated = models.DateTimeField(auto_now=True) - enable_comments = models.BooleanField(default=False) + enable_comments = models.BooleanField(default=True) PUB_STATUS = ( (0, 'Draft'), (1, 'Published'), ) status = models.IntegerField(choices=PUB_STATUS, default=0) + TEMPLATE_NAMES = ( + (0, 'Default'), + (1, 'Large Top Image'), + ) + template_name = models.IntegerField(choices=TEMPLATE_NAMES, default=0) featured_image = models.ForeignKey(LuxImage, on_delete=models.SET_NULL, null=True, blank=True) post_type = models.IntegerField(choices=PostType.choices, default=PostType.JRNL) post_topic = models.IntegerField(choices=PostTopic.choices, default=PostTopic.SPIRIT) @@ -131,8 +134,6 @@ class Post(models.Model): return self.title def get_absolute_url(self): - if self.post_type == PostType.FILM: - return reverse('film: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: |