class Product(models.Model):
amount = models.IntegerField(default=0, verbose_name='Количество товара')
<form method="post" action="{% url 'addtoshopcart' product_single.id %}">
{% csrf_token %}
<div class="quantity">
<p>Quantity</p>
<div class="pro-qty"><input type="number" value="1" name="quantity" min="1" max="{{ product_single.amount }}"></div>
</div>
<button type="submit" {% if product_single.amount < 1 %} disabled {% endif %} class="site-btn">Add to Cart</button>
</form>