3.4.2 商品概要信息的分页显示商品概要信息的分页显示页面是登录操作以后的首界面,以列表的形式显示已经存在的商品,通过这个页面,用户可以进行查看商品信息的详情、添加商品进入购物车等操作。
#查看商品信息def goods_view(request): util Util() username util.check_user(request) if username : uf
LoginForm() return render(request,index.html,{uf:uf,error:请登录后再进入}) else: #获得所有商品信息 good_list Goods.objects.all
goods_view.html, {user: username, goodss: contacts,count:count})...(1)通过代码good_list Goods.objects.all()获得所有的商品信息
图3-12 商品信息列表星云测试http:www.teststars.cc奇林软件http:www.kylinpet.com联合通测http:www.quicktesting.net