33 lines
435 B
Python
33 lines
435 B
Python
from jinja2 import Template
|
|
|
|
text = """
|
|
<!DOCTYPE html>
|
|
|
|
<html>
|
|
|
|
<head>
|
|
|
|
<meta charset="utf-8" /> <!--It is necessary to use the UTF-8 encoding with plotly graphics to get e.g. negative signs to render correctly -->
|
|
|
|
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
|
|
|
</head>
|
|
|
|
|
|
<body>
|
|
|
|
{{ text1 }}
|
|
{{ text2 }}
|
|
|
|
</body>
|
|
|
|
</html>
|
|
"""
|
|
|
|
tmpl = Template(text)
|
|
print(
|
|
tmpl.render(
|
|
text1 = "TEST"
|
|
)
|
|
)
|