1
Hello, I am trying to run this application in Flask and when I try to view the page in the browser appears server error, when I delete the line of code that creates a list of items in which each item is a link to another page the error goes missing, then I’m sure the error is in that part of the code:
<ol>
{% for i in range | atividades %}
<li>{{<a href="{{ url_for('link_atividades[i]')}}">{{atividades[i]}}</a>}}</li>
{% endfor %}
</ol>
I’m calling the template this way in the python file:
@app.route("/")
def index():
atividades = ["Estudar","Programar", "Praticar Karate", "Trabalhar", "Hobbies"]
link_atividades = ["estudar.html","programar.html" ,"praticar_karate.html" ,"trabalhar.html" ,"hobbies.html"]
return render_template("index.html", atividades=atividades, link_atividades=link_atividades)
Someone can help me ?
Put there on the question how you are calling this view too,
– AnthraxisBR
Thanks for the tip, already added.
– Gabriel Andrade Vianna