summaryrefslogtreecommitdiff
path: root/app
diff options
context:
space:
mode:
Diffstat (limited to 'app')
-rw-r--r--app/jrnl/admin.py3
-rw-r--r--app/jrnl/migrations/0051_auto_20201027_2102.py18
-rw-r--r--app/jrnl/migrations/0052_entry_new_field_notes.py19
-rw-r--r--app/jrnl/migrations/0053_auto_20201027_2105.py18
-rw-r--r--app/jrnl/models.py4
-rw-r--r--app/posts/migrations/0011_remove_post_jrnl.py17
-rw-r--r--app/posts/models.py2
7 files changed, 77 insertions, 4 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)
diff --git a/app/posts/migrations/0011_remove_post_jrnl.py b/app/posts/migrations/0011_remove_post_jrnl.py
new file mode 100644
index 0000000..d7ee29b
--- /dev/null
+++ b/app/posts/migrations/0011_remove_post_jrnl.py
@@ -0,0 +1,17 @@
+# Generated by Django 3.1 on 2020-10-27 21:01
+
+from django.db import migrations
+
+
+class Migration(migrations.Migration):
+
+ dependencies = [
+ ('posts', '0010_auto_20200815_1126'),
+ ]
+
+ operations = [
+ migrations.RemoveField(
+ model_name='post',
+ name='jrnl',
+ ),
+ ]
diff --git a/app/posts/models.py b/app/posts/models.py
index aef3a2b..898dc49 100644
--- a/app/posts/models.py
+++ b/app/posts/models.py
@@ -29,7 +29,6 @@ from locations.models import Location
from books.models import Book
from fieldnotes.models import FieldNote
from taxonomy.models import TaggedItems, Category
-from jrnl.models import Entry
from utils.util import render_images, render_products, parse_video, markdown_to_html, extract_main_image
@@ -83,7 +82,6 @@ class Post(models.Model):
originally_published_by_url = models.CharField(max_length=400, null=True, blank=True)
field_notes = models.ManyToManyField(FieldNote, blank=True)
books = models.ManyToManyField(Book, blank=True)
- jrnl = models.ManyToManyField(Entry, blank=True)
class Meta:
ordering = ('-pub_date',)