I'm trying to make a web program, but the moment I want to throw the message I get the following error:
ValueError: dictionary update sequence element # 0 has length 1; 2 is required
My code is as follows:
from jinja2 import Environment, FileSystemLoader
def name_com(nombre):
env = Environment(loader=FileSystemLoader("C:\Users\ESantana\Documents\PruebaHMTL"))
template = env.get_template("index.html")
apellidos="Santana Barcenas"
completo =nombre+apellidos
print(completo)
html, = template.render(completo)
print(html)
if __name__ == '__main__':
nombre='Edwin '
name_com(nombre)
& in my HTML so I am receiving the string
<p {{completo}} </p>