FLASK - Change goable in template

1

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?

    
asked by anonymous 01.11.2018 / 13:30

1 answer

2

To change / assign variables within the template, use:

{% set variavel = valor %}

Ex:

{% set active_page = "index" %}

References:

01.11.2018 / 14:53