Hello
I have a list of strings I pass to my Askama template. Then I try to check if a specific value exists in that list, if it does add checked
to the HTML checkbox.
Code:
<div><input type="checkbox" value="sushi" name="restaurant_categories" {% if restaurant_categories.contains(&("sushi".to_string())) %}checked{% endif %}> Sushi</div>
It gives the following Askama-error:
error: problems parsing template source at row 118, column 68 near:
"(&(\"sushi\".to_string())) %}\n
Askama can't parse it for some reason. Why?