def data(self): if not hasattr(self, '_processed_data'): data = super(WithDynamicSerializerMixin, self).data data = SideloadingProcessor(self, data).data if self.envelope else data processed_data = ReturnDict(data, serializer=self) self._processed_data = post_process(processed_data) return self._processed_data
def data(self): """Get the data, after performing post-processing if necessary.""" data = super(DynamicListSerializer, self).data processed_data = (ReturnDict(SideloadingProcessor(self, data).data, serializer=self) if self.child.envelope else ReturnList(data, serializer=self)) processed_data = post_process(processed_data) return processed_data