[Answered ]-{% for top in topwear.brand %} is not executing

1👍

Instead of this:

{% for top in topwear.brand %}
   <a href="{% url 'searchproduct' top %}" class="dropdown-item">Top Wear</a>
{% endfor %}

try this:

{% for top in topwear %}
  <a href="{% url 'searchproduct' top.brand %}" class="dropdown-item">Top Wear</a>
{% endfor %}

Leave a comment