예제 #1
0
 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
예제 #2
0
 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
예제 #3
0
 def toDict(self):
     """
     Return a reduced dictionary that will be turned to JSON
     """
     result = modelToDict(self)
     return result
예제 #4
0
 def toDict(self):
     result = modelToDict(self)
     result['uuid'] = self.uuid
     return result
예제 #5
0
 def toDict(self):
     return modelToDict(self)