How do I assign a jinja2 variable value to use later in template ?
{% if 'clear' in forcast_list[4] %}
{% img = "sunny.png" %}
{% elif "cloudy" in forcast_list[4] %}
{% img = "sun-cloudy-thunder.png" %}
{% endif %}
<div style="background: right bottom no-repeat url('../static/img/{{img}}')" class="weather-icon-pos">
<!-- weatehr Icon div -->
</div>
any help would be greatly appreciated.
render_template()
code