master
Aevann1 2022-04-16 17:05:33 +02:00
parent e547ad90cc
commit 62bfc5e629
2 changed files with 5 additions and 3 deletions

2
.gitignore vendored
View File

@ -11,3 +11,5 @@ venv/
flask_session/
.DS_Store
site_settings
daily_chart.png
weekly_chart.png

View File

@ -149,10 +149,10 @@ def cached_chart(days):
today_cutoff = calendar.timegm(midnight_this_morning)
if days:
file = "/daily_chart.png"
file = "daily_chart.png"
day_cutoffs = [today_cutoff - 86400 * i for i in range(47)][1:]
else:
file = "/weekly_chart.png"
file = "weekly_chart.png"
day_cutoffs = [today_cutoff - 86400 * 7 * i for i in range(47)][1:]
day_cutoffs.insert(0, calendar.timegm(now))