def GET(self): """Display the cart listing""" cart_id = web.cookies().get(config.cookieName) if not cart_id: cart_number = view.generateCartNumber() cart_id = db.newCart(cart_number) view.saveCookie(cart_id) return render.base(view.cartListing(cart_id))
def GET(self, action, badge_id): cart_id = view.getCookie() if not cart_id: raise web.seeother(config.make_url("/")) elif "status" in db.getCart(cart_id): view.destroyCookie() raise web.seeother(config.make_url("/")) return render.base(view.cartListing(cart_id, (action, badge_id)))
def GET(self, action, badge_id): cart_id = view.getCookie() if not cart_id: raise web.seeother(config.make_url("/")) return render.base(view.cartListing(cart_id, (action, badge_id)))