{% extends 'app/base.html' %} {% load static %} {% block title %} Category {%endblock title %} {% block content %}
<!-- <h1>Category : {{products | default:"not found" }}</h1> -->
<div class="my-5">
  <div class="row m-0 p-0">
    <div class="col-sm-2 border-end" style="height: 100vh">
      <ul class="list-unstyled">
        <li class="d-grid">
          <span class="text-center fw-bold">{{val}}</span>
          <hr />
         
          <form method="post">
            {% csrf_token %}
            <button class="btn btn-success"  type="submit">Filter</button>
            {% for sub in subCategories %}
            <p>
                {{sub}}
                <input type="checkbox" name="select" id="{{sub}}" value="{{sub}}">
            </p>
            {% endfor %}
        </form>
        </li>
      </ul>
    </div>
    <div class="col-sm-10">
      <div class="row m-0 p-0">
        {% for product in products %}
        <div class="col-sm-4">
          <a href="{% url 'product-detail' product.id %}" class="btn">
            <div>
              <img
                width="250px"
                src="{{product.product_image.url}}"
                alt="{{product.title}}"
              />
              <div class="fw-bold">{{product.title}}</div>
              <div class="fw-bold">
                Rs {{product.selling_price}}
                <small class="fw-light text-danger text-decoration-line-through"
                  >{{product.discount}}</small
                >
              </div>
            </div>
          </a>
        </div>
        {% endfor %}
      </div>
    </div>
  </div>
</div>
{% endblock content %}
