From 7c0c4efe8247fd3965b788741ff9226dea29c38f Mon Sep 17 00:00:00 2001 From: =?utf8?q?Roland=20H=C3=A4der?= Date: Mon, 29 May 2023 20:40:12 +0200 Subject: [PATCH] Continued: - move templates to own folder --- api.py | 4 ++-- index.html => templates/index.html | 0 rss.xml => templates/rss.xml | 0 3 files changed, 2 insertions(+), 2 deletions(-) rename index.html => templates/index.html (100%) rename rss.xml => templates/rss.xml (100%) diff --git a/api.py b/api.py index 1c6a98d..fdf5b07 100644 --- a/api.py +++ b/api.py @@ -26,7 +26,7 @@ import re import fba app = fastapi.FastAPI(docs_url=fba.config["base_url"] + "/docs", redoc_url=fba.config["base_url"] + "/redoc") -templates = Jinja2Templates(directory=".") +templates = Jinja2Templates(directory="templates") @app.get(fba.config["base_url"] + "/api/info") def info(): @@ -132,7 +132,7 @@ def index(request: Request, blockers: int = None, blocked: int = None, reference elif not res.ok: raise HTTPException(status_code=res.status_code, detail=res.text) - return templates.TemplateResponse("index.html", { + return templates.TemplateResponse("scoreboard.html", { "base_url" : fba.config["base_url"], "request" : request, "scoreboard": True, diff --git a/index.html b/templates/index.html similarity index 100% rename from index.html rename to templates/index.html diff --git a/rss.xml b/templates/rss.xml similarity index 100% rename from rss.xml rename to templates/rss.xml -- 2.39.5