def post(self): desk = self.get_cookie('desk') categories = mydata.categories myorder = mydata.get_discussion_order(desk) response = { 'status': 'ok', 'categories': categories, 'myorder': myorder } self.finish(json_encode(response))
def post(self): desk = json_decode(self.get_argument('desk')) desk = desk.upper() if mydatabase.check_desk(desk): self.set_cookie('desk', desk) myorder = mydata.get_discussion_order(desk) response = {'status': 'ok', 'myorder': myorder, 'desk': desk} else: response = {'status': 'no desk'} self.write(json_encode(response))
def post(self): cid = int(self.get_cookie('cid')) desk = self.get_cookie('desk') response = { 'status': 'ok', 'cid': cid, 'diet': mydata.diet, 'desk': desk, 'myorder': mydata.get_discussion_order(desk), 'categories': mydata.categories } self.write(json_encode(response))
def post(self): item_id = int(self.get_cookie('item_id')) cid = int(self.get_cookie('cid')) desk = self.get_cookie('desk') myorder = mydata.get_discussion_order(desk) diet = mydata.diet response = { 'status': 'ok', 'myorder': myorder, 'diet': diet, 'cid': cid, 'item_id': item_id } self.finish(json_encode(response))
def post(self): desk = self.get_cookie('desk') cid = int(self.get_cookie('cid')) myorder = mydata.get_discussion_order(desk) diet = mydata.diet categories = mydata.categories response = { 'status': 'ok', 'myorder': myorder, 'diet': diet, 'categories': categories, 'cid': cid } self.finish(json_encode(response))
def post(self): desk = self.get_cookie('desk') diet = mydata.diet myorder = mydata.get_discussion_order(desk) response = {'status': 'ok', 'diet': diet, 'myorder': myorder} self.write(json_encode(response))