time fixes
This commit is contained in:
parent
f02023b079
commit
d3319895c7
2 changed files with 3 additions and 5 deletions
|
|
@ -316,7 +316,7 @@ class Week(models.Model):
|
|||
if self.use_hue:
|
||||
colors = []
|
||||
for item in self.items():
|
||||
if now and item.published > now:
|
||||
if now and item.published >= now:
|
||||
continue
|
||||
color = item.get_hue(update=True)
|
||||
if color:
|
||||
|
|
|
|||
|
|
@ -64,14 +64,12 @@ def index(request):
|
|||
if request.user.is_staff and now:
|
||||
now = datetime.strptime(now, TS_FORMAT)
|
||||
now = timezone.make_aware(now, timezone.get_default_timezone())
|
||||
elif request.user.is_staff:
|
||||
now = get_now()
|
||||
else:
|
||||
now = None
|
||||
now = get_now()
|
||||
monday = get_monday(now)
|
||||
week, archive = models.Item.public(now)
|
||||
if archive and archive.exists():
|
||||
context['archive'] = '/_%s/' % get_monday(get_now() - timedelta(days=7))
|
||||
context['archive'] = '/_%s/' % get_monday(now - timedelta(days=7))
|
||||
if isinstance(week, models.Week) and week.is_break:
|
||||
context["break"] = week
|
||||
else:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue