From: Roland Häder Date: Fri, 9 Jun 2023 09:24:33 +0000 (+0200) Subject: Continued: X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=9798d4730ae33b57c8c76a2ad3f421b2b73d6135;p=fba.git Continued: - eventlet is nowhere used - need to import jinja2 templating like this --- diff --git a/api.py b/api.py index cb3823f..1275d8f 100644 --- a/api.py +++ b/api.py @@ -22,6 +22,7 @@ import re from fastapi import Request, HTTPException, Query from fastapi.responses import JSONResponse from fastapi.responses import PlainTextResponse +from fastapi.templating import Jinja2Templates import fastapi import uvicorn @@ -32,7 +33,7 @@ from fba import config from fba import fba router = fastapi.FastAPI(docs_url=config.get("base_url") + "/docs", redoc_url=config.get("base_url") + "/redoc") -templates = fastapi.templating.Jinja2Templates(directory="templates") +templates = Jinja2Templates(directory="templates") @router.get(config.get("base_url") + "/api/info.json", response_class=JSONResponse) def api_info(): diff --git a/requirements.txt b/requirements.txt index 83abe4c..3ea7728 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,7 +1,6 @@ argparse atoma beautifulsoup4 -eventlet fastapi jinja2 reqto