1from jinja2 import Template
2
3Config_1 = {1:"red",2:"blue",3:"green",4:"yellow"}
4
5Config_2 = {1:"pink",2:"orange",3:"brown",4:"darkblue"}
6
7test_temp = """
8 <!DOCTYPE html>
9 <html>
10 <head>
11 <style type="text/css">
12 *{
13 margin: 0px;
14 width: 253px;
15 }
16 div{
17 margin: 10px;
18 padding: 20px;
19 border-style: solid;
20 border-width: 10px;
21 font-size: 30px;
22 color: {{Config_1[1]}};
23 background-color: {{Config_2[1]}};
24 border-color: {{Config_2[4]}};
25 }
26 </style>
27 <title>Quiz 1</title>
28 </head>
29 <body>
30 <div>
31 My first Div element
32 </div>
33 </body>
34 </html>
35 """
36
37output = Template(test_temp)
38print(output.render(Config_1 = Config_1, Config_2 = Config_2))