from jinja2 import Environment, FileSystemLoader from webcomponents.timeline_white.model import TimeLine def render(timeline_id: int) -> str: # Create an agenda instance timeline = TimeLine(example=True) # timeline_id=timeline_id # Set up Jinja2 environment and load the template env = Environment(loader=FileSystemLoader(searchpath='./templates')) template = env.get_template('timeline.html') # Render the template with the agenda data output = template.render(timeline=timeline) return output