mirror of
https://github.com/Fluffy-Bean/GameExpo23.git
synced 2025-05-19 01:44:51 +00:00
Fix __init__ file
Style code with Black
This commit is contained in:
parent
e7bbb02aba
commit
dcc9247ba0
8 changed files with 84 additions and 62 deletions
|
@ -2,22 +2,23 @@ from flask import Blueprint, request, render_template
|
|||
from server.models import Scores
|
||||
|
||||
|
||||
blueprint = Blueprint('views', __name__)
|
||||
blueprint = Blueprint("views", __name__)
|
||||
|
||||
|
||||
@blueprint.route('/')
|
||||
@blueprint.route("/")
|
||||
# @cache.cached(timeout=60)
|
||||
def index():
|
||||
difficulty = request.args.get('diff', 0)
|
||||
difficulty = request.args.get("diff", 0)
|
||||
|
||||
top_scores = (Scores.query
|
||||
.order_by(Scores.score.desc())
|
||||
.filter_by(difficulty=difficulty)
|
||||
.limit(10)
|
||||
.all())
|
||||
return render_template('scores.html', top_scores=top_scores)
|
||||
top_scores = (
|
||||
Scores.query.order_by(Scores.score.desc())
|
||||
.filter_by(difficulty=difficulty)
|
||||
.limit(10)
|
||||
.all()
|
||||
)
|
||||
return render_template("scores.html", top_scores=top_scores)
|
||||
|
||||
|
||||
@blueprint.route('/about')
|
||||
@blueprint.route("/about")
|
||||
def about():
|
||||
return render_template('about.html')
|
||||
return render_template("about.html")
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue