需要返回的數據寫在 在上一個view中最后 return的字典中
dic = {'class_all': class_all, 'userclass_all': userclass_all, "id": id}
return render_to_response('buy.html', dic)
或者
<button class="btn btn-simple div2" rel="tooltip" title="Flip Card" onclick="rotateCard(this)">
<i class="fa fa-reply"></i> <a href="/buy?buy_info={{ classfy.id }}">購買</a>
</button>
寫在 頁面的 button 或者跳轉的 鏈接中。
其中 關於 objects.filter 的使用 當 class_all = Imfromation.objects.filter(id1=id) id 所代表的不是Imformaton 中的屬性,那么會報錯。
