I am trying to display the Number of stars for customer review in Django templates.
When i try to assign the value to a variable
{{val = customerreview.stars}}
i am getting this error
Could not parse the remainder: ' = customerreview.stars' from 'val = customerreview.stars'
Here is mycode
{% for customerreview in customerreviews %}
<div class=item>
<div class="rx-client-reviews rx-pading-none">
<div class="rx-client-img rx-pading-none">
<img src="img/main01.jpg" alt>
</div>
<div class=rx-pading-none>
<h5>{{customerreview.name}}</h5>
<h5><a href="index03.html#">{{customerreview.dasignation}}</a></h5>
<p>{{customerreview.message}}</p>
<div class=rx-rating>
<ul>
{{val = customerreview.stars}}
{% for i in val%}
<li><span class="icon icon-Star"></span></li>
{% endfor %}
<li>
<p class=rating-text>{{customerreview.stars}} star rating</p>
</li>
</ul>
</div>
</div>
</div>
</div>
{% endfor%}
Can someone help me to fix this issue . tnx.