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:
Michał Gdula 2023-06-09 22:27:30 +03:00
parent a29f06dfee
commit a4ebfa8552
61 changed files with 84 additions and 111 deletions

24
TFR/server/views.py Normal file
View 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")