def post(self): # check xsrf cookie self.check_xsrf_cookie() # get data from request method_name = self.get_argument("method_name") method_response = self.get_argument("method_response") category = self.get_argument("category", "") description = self.get_argument("description", "") # save method rpc_file = RPCMethod(os.path.join(self.api_dir, RPCHandler.PATH), method_name) rpc_file.description = description rpc_file.save(method_response) # add method to category self.api_data.save_category("RPC-%s" % method_name, category) self.set_flash_message( "success", "RPC method '%s' has been successfully created." % method_name) self.redirect("/__manage")
def post(self): # check xsrf cookie self.check_xsrf_cookie() # get data from request method_name = self.get_argument("method_name") method_response = self.get_argument("method_response") category = self.get_argument("category", "") description = self.get_argument("description", "") # save method rpc_file = RPCMethod( os.path.join(self.api_dir, RPCHandler.PATH), method_name) rpc_file.description = description rpc_file.save(method_response) # add method to category self.api_data.save_category( "RPC-%s" % method_name, category) self.set_flash_message( "success", "RPC method '%s' has been successfully created." % method_name) self.redirect("/__manage")