From bbe0feb98ae3367ce730bdf7c62aef653d89f1f0 Mon Sep 17 00:00:00 2001 From: luxagraf Date: Sun, 2 Sep 2018 10:09:42 -0600 Subject: changed homepage currator to use image widget --- app/jrnl/admin.py | 7 ++++++- app/jrnl/models.py | 1 + 2 files changed, 7 insertions(+), 1 deletion(-) (limited to 'app/jrnl') diff --git a/app/jrnl/admin.py b/app/jrnl/admin.py index bebe1ef..7f12087 100644 --- a/app/jrnl/admin.py +++ b/app/jrnl/admin.py @@ -90,4 +90,9 @@ class EntryAdmin(OSMGeoAdmin): class HomepageCurratorAdmin(admin.ModelAdmin): form = GalleryForm filter_horizontal = ('popular',) - pass + + class Media: + js = ('image-loader.js', 'next-prev-links.js') + css = { + "all": ("my_styles.css",) + } diff --git a/app/jrnl/models.py b/app/jrnl/models.py index 6dab4b9..8fe3cb0 100644 --- a/app/jrnl/models.py +++ b/app/jrnl/models.py @@ -191,6 +191,7 @@ class HomepageCurrator(models.Model): """ image_offset_vertical = models.CharField(max_length=20, help_text="add negative top margin to shift image (include css unit)") images = models.ManyToManyField(LuxImage) + featured_image = models.ForeignKey(LuxImage, on_delete=models.CASCADE, null=True, blank=True) tag_line = models.CharField(max_length=200) featured = models.ForeignKey(Entry, on_delete=models.CASCADE, related_name="banner") popular = models.ManyToManyField(Entry) -- cgit v1.2.3-70-g09d2