Big refactoring.

- clubs, booking platforms and user are now defined in customization files -> there are less environment variables
- the responsibility of the session moved
- booking cancellation is available
This commit is contained in:
Stanislas Jouffroy 2024-03-17 23:57:50 +01:00 committed by stanislas
parent dbda5a158e
commit 0938fb98b7
27 changed files with 3050 additions and 696 deletions

View file

@ -0,0 +1,12 @@
from pathlib import Path
from jinja2 import Environment, FileSystemLoader
class PayloadBuilder:
@staticmethod
def build(template_path: Path, **kwargs) -> str:
environment = Environment(loader=FileSystemLoader(template_path.parent))
template = environment.get_template(template_path.name)
return template.render(**kwargs)