summaryrefslogtreecommitdiff
path: root/app/posts
diff options
context:
space:
mode:
authorluxagraf <sng@luxagraf.net>2020-08-15 11:58:34 -0400
committerluxagraf <sng@luxagraf.net>2020-08-15 11:58:34 -0400
commitb66d000ee469539ce7aea557b612c0444177e36d (patch)
tree273547921dc6f9ded2a5681b82514c68e28ba448 /app/posts
parentd3e57c1bd17ad3e71810235a672d4782136901a5 (diff)
archived old unused apps and migrated fieldnotes to posts
Diffstat (limited to 'app/posts')
-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)