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

17 lines
308 B
Python
Raw Normal View History

2023-06-20 09:22:53 +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