22 lines
762 B
Python
22 lines
762 B
Python
from pathlib import Path
|
|
|
|
from fastapi import APIRouter, Depends, Request
|
|
from fastapi.responses import HTMLResponse
|
|
from fastapi.templating import Jinja2Templates
|
|
|
|
from app.config import Settings
|
|
from app.dependencies import get_app_settings
|
|
|
|
templates = Jinja2Templates(directory=str(Path(__file__).resolve().parents[2] / "templates"))
|
|
router = APIRouter(tags=["pages"])
|
|
|
|
|
|
@router.get("/", response_class=HTMLResponse)
|
|
def home(request: Request, settings: Settings = Depends(get_app_settings)) -> HTMLResponse:
|
|
context = {
|
|
"app_name": settings.app_name,
|
|
"app_env": settings.app_env,
|
|
"notion_status": "Legacy scope, removed from the Python rewrite target.",
|
|
}
|
|
return templates.TemplateResponse(request, "home.html", context)
|