def post(self): entityname = self.get_argument("entityname", "") arguments = self.beforesaveformat(entityname, self.request.arguments) result = entity.editEntity(entityname, arguments) if result['result']=='success': self.afterSave(entityname,arguments) self.writeLog("update", entityname,str(arguments)) self.write(tornado.escape.json_encode(result))
def post(self): entityname = "users_resources" arguments = self.beforesaveformat(entityname, self.request.arguments) result = {} if arguments.has_key("id") and arguments['id'][0] and int(arguments['id'][0])>0: result = entity.editEntity(entityname, arguments) else: result = entity.createEntity(entityname, arguments) if result['result']=='success': self.afterSave(entityname,arguments) self.writeLog("create",entityname,str(arguments)) self.write(tornado.escape.json_encode(result))
def post(self): entityname = self.get_argument("entityname", "") arguments = self.beforesaveformat(entityname, self.request.arguments) result = entity.editEntity(entityname, arguments) self.write(tornado.escape.json_encode(result))