gradient for the current week
This commit is contained in:
parent
b433230191
commit
f02023b079
3 changed files with 18 additions and 3 deletions
|
|
@ -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:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue