summaryrefslogtreecommitdiff
path: root/app/jrnl/models.py
diff options
context:
space:
mode:
Diffstat (limited to 'app/jrnl/models.py')
-rw-r--r--app/jrnl/models.py14
1 files changed, 14 insertions, 0 deletions
diff --git a/app/jrnl/models.py b/app/jrnl/models.py
index 8fe3cb0..8952eef 100644
--- a/app/jrnl/models.py
+++ b/app/jrnl/models.py
@@ -191,6 +191,19 @@ 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="oldbanner")
+ popular = models.ManyToManyField(Entry)
+ template_name = models.CharField(max_length=200, help_text="full path")
+
+
+class Home(models.Model):
+ """
+ simple model to control the featured article on the homepage
+ also allows me to fudge the "popular" section to be what I want
+ """
+ image_offset_vertical = models.CharField(max_length=20, help_text="add negative top margin to shift image (include css unit)")
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")
@@ -226,6 +239,7 @@ class EntryModerator(CommentModerator):
# do entry build right here so it goes to live site
return True
+
moderator.register(Entry, EntryModerator)