{% for i in cart_items %}
<h3><a href="/product/{{ i }}">{{ prod.i.name }}</a> </h3>
<a href="/cart/remove/{{ i }}" class="btn btn-danger" role="button">Удалить</a>
<hr>
{% endfor %}
views.py
items = request.session['items']
return render_to_response('show_cart.html', {'prod': Product.objects.all(), 'cart_items': items })
{% for i in cart_items %}
<h3><a href="/product/{{ i.id }}">{{ i.name }}</a> </h3>
<a href="/cart/remove/{{ i.id }}" class="btn btn-danger" role="button">Удалить</a>
<hr>
{% endfor %}
views.py
items = request.session['items']
return render_to_response('show_cart.html', {'cart_items': Product.objects.filter(id__in=items, ) })