Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #add item to shopping cart. Not yet tested
- def add_to_cart(object):
- cart = []
- object = Object.objects.all()
- for obj in object:
- if obj in cart:
- print("item already in Cart")
- else:
- cart.push(obj)
- print("item added to cart")
- print(cart)
Add Comment
Please, Sign In to add comment