2

I code a discord panel and I would like to put a text in another variable with quart python:

<img src="{{url_for('static', filename=f'assets/IconDiscord/{0}.png'.format(connect))}}"

maos I get this error:

jinja2.exceptions.TemplateSyntaxError: expected token ',', got 'string'

how can I insert the contents of the variable in the image url?

Jourdelune
  • 131
  • 8
  • 1
    Do you mean this `f'assets/IconDiscord/{0}.png'.format(connect)` to be both a `f` string (f prefixed) and to use the `.format` argument? I'd use `'assets/IconDiscord/{0}.png'.format(connect)` – pgjones Jan 21 '21 at 10:48

0 Answers0