From d16c597d1e4e52ab1df1c77bda54445437bac5c0 Mon Sep 17 00:00:00 2001 From: luxagraf Date: Wed, 11 Nov 2020 22:39:19 -0500 Subject: cleaned up Posts Admin and added field_notes --- app/posts/models.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'app/posts/models.py') diff --git a/app/posts/models.py b/app/posts/models.py index 898dc49..5829fe9 100644 --- a/app/posts/models.py +++ b/app/posts/models.py @@ -27,7 +27,7 @@ from normalize.models import RelatedPost from photos.models import LuxImage, LuxImageSize from locations.models import Location from books.models import Book -from fieldnotes.models import FieldNote +#from fieldnotes.models import FieldNote from taxonomy.models import TaggedItems, Category from utils.util import render_images, render_products, parse_video, markdown_to_html, extract_main_image @@ -71,16 +71,16 @@ class Post(models.Model): template_name = models.IntegerField(choices=TEMPLATES, default=0) has_video = models.BooleanField(blank=True, default=False) has_code = models.BooleanField(blank=True, default=False) - disclaimer = models.BooleanField(blank=True, default=True) + disclaimer = models.BooleanField(blank=True, default=False) books = models.ManyToManyField(Book, blank=True) - field_notes = models.ManyToManyField(FieldNote, blank=True) + #field_notes = models.ManyToManyField(FieldNote, blank=True) related = models.ManyToManyField(RelatedPost, blank=True) point = models.PointField(null=True, blank=True) location = models.ForeignKey(Location, on_delete=models.CASCADE, null=True, blank=True) topics = models.ManyToManyField(Category, blank=True) originally_published_by = models.CharField(max_length=400, null=True, blank=True) originally_published_by_url = models.CharField(max_length=400, null=True, blank=True) - field_notes = models.ManyToManyField(FieldNote, blank=True) + field_notes = models.ManyToManyField('self', blank=True, symmetrical=False, limit_choices_to = {'post_type': PostType.FIELD_NOTE}) books = models.ManyToManyField(Book, blank=True) class Meta: -- cgit v1.2.3-70-g09d2