def main(): args = get_args() app.run(debug=args.debug, host=args.host, port=args.port)
'prestige': prestige, 'prestige_percent': prestige_percent, 'percentages': percentages, 'last_date': last_date, 'top_guardians': top_guardians, 'generated_at': CACHE['generated_at'], } return CACHE['data'] @app.route('/') def index(): stats = get_stats() team_names = {k.value: k.name.title() for k in db.Team} styles = {1: 'primary', 2: 'danger', 3: 'warning'} return render_template( 'gyms.html', area_name=conf.AREA_NAME, area_size=area, minutes_ago=int((datetime.now() - stats['generated_at']).seconds / 60), last_date_minutes_ago=int((time.time() - stats['last_date']) / 60), team_names=team_names, styles=styles, **stats ) if __name__ == '__main__': args = get_args() app.run(debug=args.debug, host=args.host, port=args.port)
'strongest': strongest, 'prestige': prestige, 'prestige_percent': prestige_percent, 'percentages': percentages, 'last_date': last_date, 'top_guardians': top_guardians, 'generated_at': CACHE['generated_at'], } return CACHE['data'] @app.route('/') def index(): stats = get_stats() team_names = {k.value: k.name.title() for k in db.Team} styles = {1: 'primary', 2: 'danger', 3: 'warning'} return render_template( 'gyms.html', area_name=conf.AREA_NAME, area_size=area, minutes_ago=int((datetime.now() - stats['generated_at']).seconds / 60), last_date_minutes_ago=int((time.time() - stats['last_date']) / 60), team_names=team_names, styles=styles, **stats) if __name__ == '__main__': args = get_args() app.run(debug=args.debug, host=args.host, port=args.port)