forked from Rockachopa/Timmy-time-dashboard
13 lines
378 B
Python
13 lines
378 B
Python
"""Shared Jinja2Templates instance for all dashboard routes."""
|
|
|
|
from pathlib import Path
|
|
|
|
from fastapi.templating import Jinja2Templates
|
|
|
|
from config import settings
|
|
|
|
templates = Jinja2Templates(directory=str(Path(__file__).parent / "templates"))
|
|
|
|
# Inject site_url into every template so SEO tags and canonical URLs work.
|
|
templates.env.globals["site_url"] = settings.site_url
|