diff options
author | luxagraf <sng@luxagraf.net> | 2018-09-02 10:09:42 -0600 |
---|---|---|
committer | luxagraf <sng@luxagraf.net> | 2018-09-02 10:09:42 -0600 |
commit | bbe0feb98ae3367ce730bdf7c62aef653d89f1f0 (patch) | |
tree | 7072fb22b578e425a2888175f2d097c5756991aa /app/jrnl | |
parent | 800264daff5f4dc123a66fee068a19677eaa1170 (diff) |
changed homepage currator to use image widget
Diffstat (limited to 'app/jrnl')
-rw-r--r-- | app/jrnl/admin.py | 7 | ||||
-rw-r--r-- | app/jrnl/models.py | 1 |
2 files changed, 7 insertions, 1 deletions
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) |