From: Philipp Spitzer Date: Tue, 26 Feb 2019 22:26:59 +0000 (+0100) Subject: Add link to current and previous month's report. X-Git-Url: https://git.toastfreeware.priv.at/chrisu/seepark.git/commitdiff_plain/d782d33862c95ae0fd1c2b0f8cd75a9cbc2af95b?hp=0d28ef3dfb5db3645cba61437df118507a1e04b8 Add link to current and previous month's report. --- diff --git a/web/seepark_web.py b/web/seepark_web.py index 471d716..c6ceffb 100644 --- a/web/seepark_web.py +++ b/web/seepark_web.py @@ -467,6 +467,8 @@ def report(year, month): def index(): airvalue, airtime = currentairtemperature(cityid) watervalue, watertime = currentwatertemperature(mainsensor) + this_month = first_of_month(datetime.date.today(), 0) + last_month = first_of_month(this_month, -1) return render_template( 'seepark_web.html', @@ -475,4 +477,6 @@ def index(): watertime=watertime, airvalue=airvalue, airtime=airtime, + this_month=this_month, + last_month=last_month ) diff --git a/web/templates/seepark_web.html b/web/templates/seepark_web.html index 8524a74..974068c 100644 --- a/web/templates/seepark_web.html +++ b/web/templates/seepark_web.html @@ -75,7 +75,7 @@
-

Source code, API documentation

+

Source code, API documentation, Report for previous month/current month