summaryrefslogtreecommitdiff
path: root/app/posts/models.py
diff options
context:
space:
mode:
Diffstat (limited to 'app/posts/models.py')
-rw-r--r--app/posts/models.py11
1 files changed, 6 insertions, 5 deletions
diff --git a/app/posts/models.py b/app/posts/models.py
index dea8306..fc40475 100644
--- a/app/posts/models.py
+++ b/app/posts/models.py
@@ -39,6 +39,7 @@ class PostType(models.IntegerChoices):
ESSAY = 2, ('essay')
SRC = 3, ('src')
JRNL = 4, ('jrnl')
+ FIELD_NOTE = 5, ('field note')
class Post(models.Model):
@@ -166,11 +167,11 @@ class Post(models.Model):
self.featured_image.sizes.add(s)
self.featured_image.sizes.add(ss)
self.featured_image.save()
- if old.title != self.title or old.slug != self.slug:
- related, c = RelatedPost.objects.get_or_create(model_name=self.get_content_type(), entry_id = self.id, pub_date=self.pub_date)
- related.title = self.title
- related.slug = self.slug
- related.save()
+ #if old.title != self.title or old.slug != self.slug:
+ # related, c = RelatedPost.objects.get_or_create(model_name=self.get_content_type(), entry_id = self.id, pub_date=self.pub_date)
+ # related.title = self.title
+ # related.slug = self.slug
+ # related.save()
super(Post, self).save(*args, **kwargs)