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

4
.gitignore vendored
View File

@ -10,4 +10,6 @@ venv/
.sass-cache/
flask_session/
.DS_Store
site_settings
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))