From a854fc028ef847fe90199ffe1a2988af85dfe8d6 Mon Sep 17 00:00:00 2001 From: JulienAldon Date: Thu, 19 Feb 2026 23:50:00 +0100 Subject: [PATCH] fix generate contract path and add alembic to dependencies --- backend/requirements.txt | 1 + backend/src/contracts/generate_contract.py | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/backend/requirements.txt b/backend/requirements.txt index 7cad117..68f36e9 100644 --- a/backend/requirements.txt +++ b/backend/requirements.txt @@ -63,3 +63,4 @@ weasyprint==68.1 webencodings==0.5.1 websockets==16.0 zopfli==0.4.1 +alembic==1.18.4 \ No newline at end of file diff --git a/backend/src/contracts/generate_contract.py b/backend/src/contracts/generate_contract.py index 9f00540..aa4478b 100644 --- a/backend/src/contracts/generate_contract.py +++ b/backend/src/contracts/generate_contract.py @@ -15,7 +15,7 @@ def generate_html_contract( recurrent_price: float, total_price: float ): - template_dir = pathlib.Path().resolve() + "/src/contracts/templates" + template_dir = pathlib.Path("./src/contracts/templates").resolve() template_loader = jinja2.FileSystemLoader(searchpath=template_dir) template_env = jinja2.Environment(loader=template_loader, autoescape=jinja2.select_autoescape(["html", "xml"])) template_file = "layout.html"