Answer the question
In order to leave comments, you need to log in
How to set a variable in a template?
Hello everyone
Citizens comrades, plz remind, but rather poke into the documentation line, which tells how to set template variables through jinja. I did it once, but now I forgot :(
Answer the question
In order to leave comments, you need to log in
jinja.pocoo.org/docs/dev/templates/#assignments
Something like this{% set myvariable = [1,2,3,4] %}
solution found:
app.jinja_env.globals['UPLOAD_FOLDER'] = UPLOAD_FOLDER
app.jinja_env.globals.update()
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question