fsd
This commit is contained in:
parent
559b402c4e
commit
07d782581d
2 changed files with 5 additions and 3 deletions
4
.gitignore
vendored
4
.gitignore
vendored
|
@ -10,4 +10,6 @@ venv/
|
||||||
.sass-cache/
|
.sass-cache/
|
||||||
flask_session/
|
flask_session/
|
||||||
.DS_Store
|
.DS_Store
|
||||||
site_settings
|
site_settings
|
||||||
|
daily_chart.png
|
||||||
|
weekly_chart.png
|
|
@ -149,10 +149,10 @@ def cached_chart(days):
|
||||||
today_cutoff = calendar.timegm(midnight_this_morning)
|
today_cutoff = calendar.timegm(midnight_this_morning)
|
||||||
|
|
||||||
if days:
|
if days:
|
||||||
file = "/daily_chart.png"
|
file = "daily_chart.png"
|
||||||
day_cutoffs = [today_cutoff - 86400 * i for i in range(47)][1:]
|
day_cutoffs = [today_cutoff - 86400 * i for i in range(47)][1:]
|
||||||
else:
|
else:
|
||||||
file = "/weekly_chart.png"
|
file = "weekly_chart.png"
|
||||||
day_cutoffs = [today_cutoff - 86400 * 7 * i for i in range(47)][1:]
|
day_cutoffs = [today_cutoff - 86400 * 7 * i for i in range(47)][1:]
|
||||||
|
|
||||||
day_cutoffs.insert(0, calendar.timegm(now))
|
day_cutoffs.insert(0, calendar.timegm(now))
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue