diff options
Diffstat (limited to 'app/jrnl')
-rw-r--r-- | app/jrnl/admin.py | 3 | ||||
-rw-r--r-- | app/jrnl/migrations/0051_auto_20201027_2102.py | 18 | ||||
-rw-r--r-- | app/jrnl/migrations/0052_entry_new_field_notes.py | 19 | ||||
-rw-r--r-- | app/jrnl/migrations/0053_auto_20201027_2105.py | 18 | ||||
-rw-r--r-- | app/jrnl/models.py | 4 |
5 files changed, 60 insertions, 2 deletions
diff --git a/app/jrnl/admin.py b/app/jrnl/admin.py index 70bf229..32ef69b 100644 --- a/app/jrnl/admin.py +++ b/app/jrnl/admin.py @@ -74,9 +74,10 @@ class EntryAdmin(OSMGeoAdmin): ('Extra', { 'fields': ( 'field_notes', + #'old_field_notes', 'books', 'related', - 'oldrelated', + #'oldrelated', ), 'classes': ( 'collapse', diff --git a/app/jrnl/migrations/0051_auto_20201027_2102.py b/app/jrnl/migrations/0051_auto_20201027_2102.py new file mode 100644 index 0000000..09d0dea --- /dev/null +++ b/app/jrnl/migrations/0051_auto_20201027_2102.py @@ -0,0 +1,18 @@ +# Generated by Django 3.1 on 2020-10-27 21:02 + +from django.db import migrations + + +class Migration(migrations.Migration): + + dependencies = [ + ('jrnl', '0050_auto_20191206_0741'), + ] + + operations = [ + migrations.RenameField( + model_name='entry', + old_name='field_notes', + new_name='old_field_notes', + ), + ] diff --git a/app/jrnl/migrations/0052_entry_new_field_notes.py b/app/jrnl/migrations/0052_entry_new_field_notes.py new file mode 100644 index 0000000..3ec3167 --- /dev/null +++ b/app/jrnl/migrations/0052_entry_new_field_notes.py @@ -0,0 +1,19 @@ +# Generated by Django 3.1 on 2020-10-27 21:04 + +from django.db import migrations, models + + +class Migration(migrations.Migration): + + dependencies = [ + ('posts', '0011_remove_post_jrnl'), + ('jrnl', '0051_auto_20201027_2102'), + ] + + operations = [ + migrations.AddField( + model_name='entry', + name='new_field_notes', + field=models.ManyToManyField(blank=True, to='posts.Post'), + ), + ] diff --git a/app/jrnl/migrations/0053_auto_20201027_2105.py b/app/jrnl/migrations/0053_auto_20201027_2105.py new file mode 100644 index 0000000..904b6c2 --- /dev/null +++ b/app/jrnl/migrations/0053_auto_20201027_2105.py @@ -0,0 +1,18 @@ +# Generated by Django 3.1 on 2020-10-27 21:05 + +from django.db import migrations + + +class Migration(migrations.Migration): + + dependencies = [ + ('jrnl', '0052_entry_new_field_notes'), + ] + + operations = [ + migrations.RenameField( + model_name='entry', + old_name='new_field_notes', + new_name='field_notes', + ), + ] diff --git a/app/jrnl/models.py b/app/jrnl/models.py index 9ceac2d..830a244 100644 --- a/app/jrnl/models.py +++ b/app/jrnl/models.py @@ -25,6 +25,7 @@ from photos.models import PhotoGallery, LuxImage, LuxImageSize from locations.models import Location from books.models import Book from fieldnotes.models import FieldNote +from posts.models import Post from normalize.models import RelatedPost from utils.util import render_images, parse_video, markdown_to_html @@ -77,7 +78,8 @@ class Entry(models.Model): template_name = models.IntegerField(choices=TEMPLATES, default=0) featured_image = models.ForeignKey(LuxImage, on_delete=models.CASCADE, null=True, blank=True) has_video = models.BooleanField(blank=True, default=False) - field_notes = models.ManyToManyField(FieldNote, blank=True) + old_field_notes = models.ManyToManyField(FieldNote, blank=True) + field_notes = models.ManyToManyField(Post, blank=True, limit_choices_to={'post_type': 5}) books = models.ManyToManyField(Book, related_name="luxbooks", blank=True) oldrelated = models.ManyToManyField(OldRelatedPost, blank=True) related = models.ManyToManyField(RelatedPost, blank=True) |