summaryrefslogtreecommitdiff
path: root/app/jrnl
diff options
context:
space:
mode:
Diffstat (limited to 'app/jrnl')
-rw-r--r--app/jrnl/admin.py6
-rw-r--r--app/jrnl/migrations/0050_auto_20191206_0741.py18
-rw-r--r--app/jrnl/models.py2
3 files changed, 22 insertions, 4 deletions
diff --git a/app/jrnl/admin.py b/app/jrnl/admin.py
index 081db39..70bf229 100644
--- a/app/jrnl/admin.py
+++ b/app/jrnl/admin.py
@@ -22,7 +22,7 @@ class EntryAdmin(OSMGeoAdmin):
def get_queryset(self, request):
test_model_qs = super(EntryAdmin, self).get_queryset(request)
- test_model_qs = test_model_qs.prefetch_related('newrelated').prefetch_related('books')
+ test_model_qs = test_model_qs.prefetch_related('related').prefetch_related('books')
return test_model_qs
@@ -44,7 +44,7 @@ class EntryAdmin(OSMGeoAdmin):
search_fields = ['title', 'body_markdown']
prepopulated_fields = {"slug": ('title',)}
list_filter = ('pub_date', 'enable_comments', 'status', 'location__state__country__lux_region')
- filter_horizontal = ('field_notes', 'books', 'newrelated')
+ filter_horizontal = ('field_notes', 'books', 'related')
fieldsets = (
('Entry', {
'fields': (
@@ -75,7 +75,7 @@ class EntryAdmin(OSMGeoAdmin):
'fields': (
'field_notes',
'books',
- 'newrelated',
+ 'related',
'oldrelated',
),
'classes': (
diff --git a/app/jrnl/migrations/0050_auto_20191206_0741.py b/app/jrnl/migrations/0050_auto_20191206_0741.py
new file mode 100644
index 0000000..b732b68
--- /dev/null
+++ b/app/jrnl/migrations/0050_auto_20191206_0741.py
@@ -0,0 +1,18 @@
+# Generated by Django 2.2.6 on 2019-12-06 07:41
+
+from django.db import migrations
+
+
+class Migration(migrations.Migration):
+
+ dependencies = [
+ ('jrnl', '0049_entry_newrelated'),
+ ]
+
+ operations = [
+ migrations.RenameField(
+ model_name='entry',
+ old_name='newrelated',
+ new_name='related',
+ ),
+ ]
diff --git a/app/jrnl/models.py b/app/jrnl/models.py
index 6b0b154..dda9d6d 100644
--- a/app/jrnl/models.py
+++ b/app/jrnl/models.py
@@ -80,7 +80,7 @@ class Entry(models.Model):
field_notes = models.ManyToManyField(FieldNote, blank=True)
books = models.ManyToManyField(Book, related_name="luxbooks", blank=True)
oldrelated = models.ManyToManyField(OldRelatedPost, blank=True)
- newrelated = models.ManyToManyField(RelatedPost, blank=True)
+ related = models.ManyToManyField(RelatedPost, blank=True)
class Meta:
ordering = ('-pub_date',)