time fixes
This commit is contained in:
parent
f02023b079
commit
d3319895c7
2 changed files with 3 additions and 5 deletions
|
|
@ -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