更新
This commit is contained in:
16
Python-100-Days/Day41-55/shop_origin/cart/views.py
Normal file
16
Python-100-Days/Day41-55/shop_origin/cart/views.py
Normal file
@@ -0,0 +1,16 @@
|
||||
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
|
||||
Reference in New Issue
Block a user