Python file:
@app.route('/home/<argument>')
def home_page(argument):
return render_template('home.html', keys=argument)
HTML file:
<!-- inside the url http://127.0.0.1:5000/home/age -->
{{ if argument == "age" }}
<p>Age 50</p>
{{ else }}
<p>Invalid</p>
{{ endif }}
This results in the following error:
jinja2.exceptions.TemplateSyntaxError: expected token 'end of print statement', got 'argument'