def patch(self): group = self.shared.group_get(self.request.matchdict['object_id']) schema = GroupEditSchema(context={'request': self.request, 'modified_obj': group}) data = schema.load(self.request.unsafe_json_body).data self.shared.populate_instance(group, data) return schema.dump(group).data
def post(self): schema = GroupEditSchema(context={'request': self.request}) data = schema.load(self.request.unsafe_json_body).data group = Group() self.shared.populate_instance(group, data) group.persist(flush=True, db_session=self.request.dbsession) return schema.dump(group).data
def post(self): schema = GroupEditSchema(context={"request": self.request}) data = schema.load(self.request.unsafe_json_body).data group = Group() self.shared.populate_instance(group, data) group.persist(flush=True, db_session=self.request.dbsession) return schema.dump(group).data
def patch(self): group = self.shared.group_get(self.request.matchdict["object_id"]) schema = GroupEditSchema( context={"request": self.request, "modified_obj": group} ) data = schema.load(self.request.unsafe_json_body).data self.shared.populate_instance(group, data) return schema.dump(group).data
def get(self): schema = GroupEditSchema(context={'request': self.request}) group = self.shared.group_get(self.request.matchdict['object_id']) return schema.dump(group).data
def collection_list(self): groups = self.shared.collection_list() schema = GroupEditSchema(context={'request': self.request}) return schema.dump([group for group in groups], many=True).data
def get(self): schema = GroupEditSchema(context={"request": self.request}) group = self.shared.group_get(self.request.matchdict["object_id"]) return schema.dump(group).data
def collection_list(self): groups = self.shared.collection_list() schema = GroupEditSchema(context={"request": self.request}) return schema.dump([group for group in groups], many=True).data