I have this html code in my template .From this template i want the value of i.id to my another view in views.py. Or when the user click the submmit button, i want that id in my another view. how can i achieve this.
<form action="shop" method="POST">
{% csrf_token %}
<input hidden type="text" name="product" value="{{i.id}}">
<input type="submit" value="Add to cart">
<a href="{% url 'webapp:shop' i.id %}" class="btn btn-success">Add to cart</a>
</form>