Все получилось.
шаблон:
<form action="{% url 'cart:cart_modificate' %}" method="post">
{% csrf_token %}
<input type="hidden" name="id" value="{{product.id}}" />
<input class="cart_form" name="button" type="submit" value="+" />
<input class="cart_form" name="button" type="submit" value="-" />
</form>
представление:
def cart_modificate(request):
cart = Cart(request)
if request.method == 'POST':
product_id = request.POST['id']
button = request.POST['button']
product = get_object_or_404(Product, id=product_id)
if button == '+':
increment = button
decrement = None
else:
increment = None
decrement = button
cart.modificate(product, increment, decrement)
return redirect('cart:cart_detail')