diff options
author | luxagraf <sng@luxagraf.net> | 2020-11-11 22:39:19 -0500 |
---|---|---|
committer | luxagraf <sng@luxagraf.net> | 2020-11-11 22:39:19 -0500 |
commit | d16c597d1e4e52ab1df1c77bda54445437bac5c0 (patch) | |
tree | 30b8d52cb3c874ad7656be08d1295529353a97db /app/posts/models.py | |
parent | ef37adba510d3f18fe23f7bc34071c70df21a191 (diff) |
cleaned up Posts Admin and added field_notes
Diffstat (limited to 'app/posts/models.py')
-rw-r--r-- | app/posts/models.py | 8 |
1 files changed, 4 insertions, 4 deletions
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: |