Files
CTFd/CTFd/scoreboard.py
Kevin Chung 6833378c36 Format all the things (#991)
* Format Javascript and CSS files with `prettier`: `prettier --write 'CTFd/themes/**/*'`
* Format Python with `black`: `black CTFd` & `black tests`
* Travis now uses xenial instead of trusty.
2019-05-11 21:09:37 -04:00

20 lines
485 B
Python

from flask import render_template, Blueprint
from CTFd.utils import config
from CTFd.utils.decorators.visibility import check_score_visibility
from CTFd.utils.scores import get_standings
scoreboard = Blueprint("scoreboard", __name__)
@scoreboard.route("/scoreboard")
@check_score_visibility
def listing():
standings = get_standings()
return render_template(
"scoreboard.html",
standings=standings,
score_frozen=config.is_scoreboard_frozen(),
)