• variable
  • flask
  • jinja

In Jinja, outputting a variable is done by using it in its own expression:

{{ my_var }}

Users get confused by this when trying to reference the variable in another expression:

{{ url_for('static', filename='{{ my_var }}') }}

Don’t nest curly braces within a Jinja expression, you’re already in the expression.
Simply treat it like a regular Python expression at that point.

{{ url_for('static', filename=my_var) }}