32 lines
507 B
Python
32 lines
507 B
Python
from jinja2 import Environment, FileSystemLoader
|
|
import os
|
|
|
|
env = Environment(loader=FileSystemLoader('.'))
|
|
template = env.get_template('page.j2')
|
|
|
|
# Define the data to pass to the template
|
|
data = {
|
|
'title': 'Rocky Man Page - 8.10',
|
|
'header_title': 'Welcome to Rocky Man Page',
|
|
'main_content': '<input type="text" id="searchInput" placeholder="Search..."><ul><li>Item 1</li><li>Item 2</li></ul>'
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
# Render the template with the data
|
|
output = template.render(data)
|
|
|
|
print(output) |