Exemplo n.º 1
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"]))
Exemplo n.º 2
0
 def handle(self, *args, **options):
     print("Refreshing Traffic data...")
     refreshed_count = Traffic.update_data()
     print(refreshed_count)