Python-100-Days/Day41-55/shop_origin/cart/views.py

17 lines
308 B
Python
Raw Normal View History

2018-05-25 17:00:43 +08:00
from django.shortcuts import render
from cart.models import Goods
def index(request):
goods_list = list(Goods.objects.all())
return render(request, 'goods.html', {'goods_list': goods_list})
def show_cart(request):
return render(request, 'cart.html')
def add_to_cart(request, no):
pass