summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorluxagraf <sng@luxagraf.net>2019-11-10 08:59:39 -0500
committerluxagraf <sng@luxagraf.net>2019-11-10 08:59:39 -0500
commita968aaa8dcbc7465b774bba159e74f71bf7858f3 (patch)
treecd4a518012a8d801412e8f56a85dfedc34451ac3
parentc3c2664ea31f2f561893ff4e51fded995251bed9 (diff)
renamed new books relation to just books
-rw-r--r--app/jrnl/admin.py6
-rw-r--r--app/jrnl/migrations/0047_auto_20191110_0859.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 1c82d25..78a2630 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('related').prefetch_related('books_new')
+ 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_new', 'related')
+ filter_horizontal = ('field_notes', 'books', 'related')
fieldsets = (
('Entry', {
'fields': (
@@ -74,7 +74,7 @@ class EntryAdmin(OSMGeoAdmin):
('Extra', {
'fields': (
'field_notes',
- 'books_new',
+ 'books',
'related',
),
'classes': (
diff --git a/app/jrnl/migrations/0047_auto_20191110_0859.py b/app/jrnl/migrations/0047_auto_20191110_0859.py
new file mode 100644
index 0000000..28d3866
--- /dev/null
+++ b/app/jrnl/migrations/0047_auto_20191110_0859.py
@@ -0,0 +1,18 @@
+# Generated by Django 2.2.6 on 2019-11-10 08:59
+
+from django.db import migrations
+
+
+class Migration(migrations.Migration):
+
+ dependencies = [
+ ('jrnl', '0046_remove_entry_books'),
+ ]
+
+ operations = [
+ migrations.RenameField(
+ model_name='entry',
+ old_name='books_new',
+ new_name='books',
+ ),
+ ]
diff --git a/app/jrnl/models.py b/app/jrnl/models.py
index c89791e..a9be032 100644
--- a/app/jrnl/models.py
+++ b/app/jrnl/models.py
@@ -78,7 +78,7 @@ class Entry(models.Model):
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)
- books_new = models.ManyToManyField(Book, related_name="luxbooks", blank=True)
+ books = models.ManyToManyField(Book, related_name="luxbooks", blank=True)
related = models.ManyToManyField(OldRelatedPost, blank=True)
class Meta: