Files

21 lines
485 B
Python
Raw Permalink Normal View History

from pathlib import Path
from fastapi import APIRouter, Request
from fastapi.templating import Jinja2Templates
router = APIRouter(tags=["ops"])
BASE_DIR = Path(__file__).resolve().parent.parent.parent
templates = Jinja2Templates(directory=str(BASE_DIR / "templates"))
@router.get("/ops")
async def ops_page(request: Request):
return templates.TemplateResponse(
"ops.html",
{
"request": request,
"page_title": "IT Ops",
},
)