def handle(self, *args, **options):
     print("Refreshing Happy data...")
     Happy.update_data()
Beispiel #2
0
def index(request):
    env = Environment(loader=PackageLoader('cityscape', 'templates'))
    template = env.get_template('jinja2/index.html')
    return HttpResponse(template.render(influx_calc = Influx.score_calc(),influx =Influx.score(), traffic = Traffic.comparison(), weather = ''.join((Weather.current_weather(), ".png")), image = Happy.chart()["image"]))
Beispiel #3
0
def chart(request):
    return JsonResponse(Happy.chart(), safe=False)
 def handle(self, *args, **options):
     print("Refreshing Happy data...")
     Happy.update_data()