Пример #1
0
 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))
Пример #2
0
 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))
Пример #3
0
    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)))
Пример #4
0
    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)))
Пример #5
0
    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)))
Пример #6
0
    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)))