Example #1
0
 def get(self):
     template_values = {
         "temps": db_calls.get_dict_temps(),
         "watts": utils.get_light()
     }
     template = JINJA_ENVIRONMENT.get_template('templates/temp_chart.jinja2')
     self.response.write(template.render(template_values))
Example #2
0
 def get(self):
     days = int(self.request.params.get("range", 3))
     template_values = {
         "temps": db_calls.get_dict_temps(days),
     }
     self.response.write(json.dumps(template_values))