def toDict(self): result = modelToDict(self) result['type'] = self.__class__.__name__ result['uuid'] = self.uuid if self.style: result['style'] = modelToDict(STYLE_MANAGER.get(uuid=self.style.uuid)) if self.labelStyle: result['labelStyle'] = modelToDict(self.labelStyle) return result
def toDict(self): result = modelToDict(self) result['uuid'] = self.uuid featuresList = [] features = FEATURE_MANAGER.filter(mapLayer__pk=self.uuid) for feature in features: featuresList.append(feature.toDict()) result['features'] = featuresList return result
def toDict(self): """ Return a reduced dictionary that will be turned to JSON """ result = modelToDict(self) return result
def toDict(self): result = modelToDict(self) result['uuid'] = self.uuid return result
def toDict(self): return modelToDict(self)