File tree Expand file tree Collapse file tree 1 file changed +1
-8
lines changed
Expand file tree Collapse file tree 1 file changed +1
-8
lines changed Original file line number Diff line number Diff line change 1616@ctf .route ("/scoreboard" )
1717@login_required
1818def scoreboard ():
19- #users = User.query.order_by(User.id).all()
2019 scores = Score .query .order_by (Score .points .desc (), Score .timestamp ).all ()
2120 userNameScoreList = []
2221 for score in scores :
2322 userNameScoreList .append ({'username' : User .query .get (score .user_id ).username ,'score' :score .points })
24- '''
25- scores = Score.query.order_by(Score.points.desc(), Score.timestamp).all()
26- userNameScoreList = []
27- for score in scores:
28- userNameScoreList.append({'username': score.query.with_parent(user).username,'score':score.points})
29- print(userNameScoreList)
30- '''
23+
3124 return render_template ('scoreboard.html' , scores = userNameScoreList , ctfname = ctfname )
3225
3326''' Machine Info '''
You can’t perform that action at this time.
0 commit comments