Esempio n. 1
0
def get_cats():
    users = get_leaders()
    users_list = []
    for user in users:
        users_list.append({'name':user.username,
                           'click_time':str(user.clicked),
                           'waited_time':str(user.waited)})
    print users_list
    return jsonify({'cats':users_list})
Esempio n. 2
0
def index(page=1):
    form = ClickForm()
    last_click, last_clicker = get_last_click_and_clicker()
    delta = datetime.utcnow() - last_click
    leaders = get_leaders(page)
    return render_template('index.html', **locals())