8 lines
418 B
HTML
8 lines
418 B
HTML
<form method="POST" action={% url "carts:update" %} class="form"> {% csrf_token %}
|
|
<input type="hidden" name="product_id" value="{{ object.id }}" />
|
|
{% if object in cart.products.all %}
|
|
<button class="btn btn-link" style="padding: 0px">Remove from cart?</button>
|
|
{% else %}
|
|
<button class="btn btn-success">ADD to cart</button>
|
|
{% endif %}
|
|
</form> |