gradient for the current week

This commit is contained in:
j 2025-02-15 00:51:32 +01:00
commit f02023b079
3 changed files with 18 additions and 3 deletions

View file

@ -312,11 +312,12 @@ class Week(models.Model):
items, _ = Item.public(monday)
return items.order_by('published')
@property
def background(self):
def background(self, now=None):
if self.use_hue:
colors = []
for item in self.items():
if now and item.published > now:
continue
color = item.get_hue(update=True)
if color:
if not colors: