0
My code is generating a " Unexpected '%' error", all symbols being properly correct.
I have a route to show the companies Cnpjs in a list, follows function of the listing below:
@app.route("/list/company")
def listCompany():
companies = Company.query.all()
return render_template("listCompany.html", companies = companies)
Below is the HTML section of the listing page.
<table>
<tr>
<td>ID</td>
<td>Nome</td>
</tr>
{{% for companie in companies %}}
<tr>
<td> {{ companies._id }} </td>
<td> {{ companies.cnpj }} </td>
</tr>
{{% endfor %}}
</table>
This code gives me the error:
jinja2.exceptions.Templatesyntaxerror: Unexpected '%'
Thank you very much!!!!!!!!
– Felipe Guimarães
For nothing! ;-) It really happens, sometimes goes unnoticed.
– Robson Silva