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',
watertime=watertime,
airvalue=airvalue,
airtime=airtime,
+ this_month=this_month,
+ last_month=last_month
)
</div>
<hr />
- <p><small><a href="https://git.toastfreeware.priv.at/chrisu/seepark.git">Source code</a>, <a href="{{url_for('static', filename='doc/index.html')}}">API documentation</a></small></p>
+ <p><small><a href="https://git.toastfreeware.priv.at/chrisu/seepark.git">Source code</a>, <a href="{{url_for('static', filename='doc/index.html')}}">API documentation</a>, Report for <a href="{{url_for('report', year=last_month.year, month=last_month.month)}}">previous month</a>/<a href="{{url_for('report', year=this_month.year, month=this_month.month)}}">current month</a></small></p>
<!-- Load own javascript code -->
<script src="{{url_for('static', filename='seepark_web.js')}}"></script>