I am using Jinja and am trying to set the "value" of the option to a variable. I tried this: <option value = {{stock['name']}}>{{stock['name]}}</option>
, but it thinks that the {{stock['name'
is a string, and the bits after that are normal. Does anyone know how I can fix this?
1 Answer
Thank you, I already found the answer. Dinocodersaurus, that was a typo, and I already had included the closing ' in my actual code. The solution was to simply add spaces, so it was value = {{ stock['name'] }}
'
here{{stock['name]}}