Files
site_aegisone/py_service/app/templating.py
T

11 lines
387 B
Python

from fastapi.templating import Jinja2Templates
from app.config import get_settings
from app.version import get_app_version
settings = get_settings()
templates = Jinja2Templates(directory="app/templates")
templates.env.globals["SITE_NAME"] = "AegisOne Engineering"
templates.env.globals["app_version"] = get_app_version()
templates.env.globals["PORTAINER_URL"] = settings.PORTAINER_URL