def reply(self): if not self.controlpanel_name: raise BadRequest('Missing parameter controlpanelname') panel = self.panel_by_name(self.controlpanel_name) deserializer = IDeserializeFromJson(panel) deserializer() # The deserializer knows where to put it. self.request.response.setStatus(204)
def reply(self): if not self.controlpanel_name: raise BadRequest("Missing parameter controlpanelname") panel = self.panel_by_name(self.controlpanel_name) deserializer = IDeserializeFromJson(panel) deserializer() # The deserializer knows where to put it. return self.reply_no_content()
def update(self, names): name = names[0] if IPloneRestapiLayer.providedBy(self.request): noLongerProvides(self.request, IPloneRestapiLayer) context = queryMultiAdapter((self.context, self.request), name='dexterity-types') context = context.publishTraverse(self.request, name) deserializer = IDeserializeFromJson(self) return deserializer(context)
def reply(self): if not self.params: raise BadRequest("Missing parameter controlpanelname") panel = self.panel_by_name(self.params[0]) if len(self.params) > 1: # Update panel child panel.update(self.params[1:]) else: # Update panel deserializer = IDeserializeFromJson(panel) deserializer() # The deserializer knows where to put it. return self.reply_no_content()