I passed the template a variable and need to change (in the template) the value of it.
Ex: no controller: return render_template('index.html', start_code = start_code)
. I need to change start_code
there in the template. How do I?
I passed the template a variable and need to change (in the template) the value of it.
Ex: no controller: return render_template('index.html', start_code = start_code)
. I need to change start_code
there in the template. How do I?
To change / assign variables within the template, use:
{% set variavel = valor %}
Ex:
{% set active_page = "index" %}
References: