# -*- coding: utf-8 -*- from flask import Flask, Response, render_template, url_for from log_colorizer import make_colored_stream_handler from logging import getLogger, INFO, DEBUG import pygal from pygal.config import Config from pygal.style import styles import string import random def random_label(): chars = string.letters + string.digits + u' àéèçêâäëï' return ''.join( [random.choice(chars) for i in range( random.randrange(4, 30))]) def random_value(min=0, max=15): return random.randrange(min, max, 1) def create_app(): """Creates the pygal test web app""" app = Flask(__name__) handler = make_colored_stream_handler() getLogger('werkzeug').addHandler(handler) getLogger('werkzeug').setLevel(INFO) getLogger('pygal').addHandler(handler) getLogger('pygal').setLevel(DEBUG) @app.route("/") def index(): return render_template('index.jinja2') @app.route("/all--