]> ToastFreeware Gitweb - chrisu/seepark.git/blobdiff - web/seepark_web.py
Add link to current and previous month's report.
[chrisu/seepark.git] / web / seepark_web.py
index 471d716e33aab759599ead8d89427b7adbfd8863..c6ceffb8614b6f049317983f6372bcc217e12048 100644 (file)
@@ -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
     )