def report_single(pokemon_id): session = db.Session() session_stats = db.get_session_stats(session) js_data = { 'charts_data': { 'hours': db.get_spawns_per_hour(session, pokemon_id), }, 'map_center': utils.get_map_center(), 'zoom': 13, } session.close() return render_template( 'report_single.html', current_date=datetime.now(), area_name=config.AREA_NAME, area_size=utils.get_scan_area(), pokemon_id=pokemon_id, pokemon_name=POKEMON_NAMES[pokemon_id], total_spawn_count=db.get_total_spawns_count(session, pokemon_id), session_start=session_stats['start'], session_end=session_stats['end'], session_length_hours=int(session_stats['length_hours']), google_maps_key=config.GOOGLE_MAPS_KEY, js_data=js_data, )
def report_single(pokemon_id): session = db.Session() session_stats = db.get_session_stats(session) js_data = { 'charts_data': { 'hours': db.get_spawns_per_hour(session, pokemon_id), }, 'map_center': utils.get_map_center(), 'zoom': 13, } session.close() return render_template( 'report_single.html', current_date=datetime.now(), area_name=config.AREA_NAME, area_size=utils.get_scan_area(), pokemon_id=pokemon_id, pokemon_name=POKEMON_NAMES[pokemon_id], total_spawn_count=db.get_total_spawns_count(session, pokemon_id), session_start=session_stats['start'], session_end=session_stats['end'], session_length_hours=int(session_stats['length_hours']), google_maps_key=config.GOOGLE_MAPS_KEY, js_data=js_data, )