Example #1
0
def GET():
    contests = db.Read_Contestlist()
    users = list(db.Read_Userlist())
    users.sort(key=lambda x: (x['total_ac'], -x['total_submit']), reverse=True)
    zishengs = db.Read_Zisheng()
    return render_template('home.html',
                           contests=contests,
                           users=users[:10],
                           zishengs=zishengs)
Example #2
0
def Run():
    contestlist = db.Read_Contestlist()
    return render_template('contestlist.html', contestlist=contestlist)
Example #3
0
def Contest_Players_Recalculate_All():
    contests = db.Read_Contestlist()
    for contest in contests:
        contest_id = contest[0]
        Contest_Players_Recalculate(contest_id)
Example #4
0
def Run():
	contests = db.Read_Contestlist()

	users = list(db.Read_Userlist())
	users.sort( key = lambda x: (x[9],-x[10]) , reverse=True )
	return render_template('home.html',contests=contests,users=users[:10])