def GET(self, resource, context): reference = context.query['reference'] if reference: order = resource.parent.get_resource(str(reference), soft=True) if order: msg = INFO(u'Reference found !') return context.come_back(msg, goto=context.get_link(order)) else: context.message = ERROR(u'Unknow reference "%s"' % reference) return STLForm.GET(self, resource, context)
def GET(self, resource, context): cart = ProductCart(context) # Check if cart is valid if not cart.is_valid(): return context.come_back(CART_ERROR, goto='/') return STLForm.GET(self, resource, context)
def GET(self, resource, context): # Back-Office hostname = context.uri.authority if hostname[:6] == 'admin.': return context.uri.resolve('/shop/;administration') return STLForm.GET(self, resource, context)
def GET(self, resource, context): real_resource = self.get_real_resource(resource, context) return STLForm.GET(self, real_resource, context)