mirror of
https://github.com/Fluffy-Bean/GameExpo23.git
synced 2025-05-31 14:53:11 +00:00
Fuck so much to comment on
Renamed the folders and containers to something more reasonable Using .env file for secretes so I can better hide them from git Mostly it, I think
This commit is contained in:
parent
a29f06dfee
commit
a4ebfa8552
61 changed files with 84 additions and 111 deletions
24
TFR/server/views.py
Normal file
24
TFR/server/views.py
Normal file
|
@ -0,0 +1,24 @@
|
|||
from flask import Blueprint, request, render_template
|
||||
from server.models import Scores
|
||||
|
||||
|
||||
blueprint = Blueprint("views", __name__)
|
||||
|
||||
|
||||
@blueprint.route("/")
|
||||
# @cache.cached(timeout=60)
|
||||
def index():
|
||||
difficulty = request.args.get("diff", 0)
|
||||
|
||||
scores = (
|
||||
Scores.query.filter_by(difficulty=difficulty)
|
||||
.order_by(Scores.score.desc())
|
||||
.limit(10)
|
||||
.all()
|
||||
)
|
||||
return render_template("scores.html", scores=scores)
|
||||
|
||||
|
||||
@blueprint.route("/about")
|
||||
def about():
|
||||
return render_template("about.html")
|
Loading…
Add table
Add a link
Reference in a new issue