def data(): data = read_attendance_data() if request.method == "POST": data = read_attendance_data() print request.form data = sort_data(data, request.form['order']) return render_template("data.html", d={"data": data})
def data_order(order="attendance-desc"): data = read_attendance_data() if order: data = sort_data(data, order) return render_template("data.html", d={"data": data})
def facts(): data = read_attendance_data() facts = find_facts(data) x = facts['max'] y = facts['min'] z = facts['max_percent'] a = facts['min_percent'] return render_template("facts.html", x=x, y=y, z=z, a=a)
def home(): data = read_attendance_data() facts = find_facts(data) return render_template("home.html", d={"data": data, "facts": facts})
def data(): data = read_attendance_data() return render_template("data.html", d={"data": data})