i rendered data form views to template and i want that data from that template to another view.

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> 

You need to persist this data somewhere in your system between requests. The common way is to store it in your database. You can also store it in sessions, which by default, stores the data in your database anyway.

Or, you could have the form submit to your other view, and have that view accept the input from the post and use that data for constructing that new view.