예제 #1
0
 def dict(self):
     response = getDict(self)
     del response['stripeToken']
     del response['privateKey']
     del response['password']
     del response['salt']
     return response
예제 #2
0
 def toDict(self):
     response = getDict(self)
     try:
         response['start'] = int(self.start)
     except:
         pass  #hANDLE DATE TYPE
     response['source'] = str(self.source.id)
     return response
예제 #3
0
 def dict(self):
     response = getDict(self)
     del response['client']
     del response['credentials']
     # del response['schemaOverRide']
     response['schema'] = SourceHandler.getSchema(clientID=str(
         self.client.id),
                                                  sourceID=str(self.id))
     # response['schema'].update(self.schemaOverRide)
     return response
예제 #4
0
    def dict(self):
        response = getDict(self)
        try:
            response['query']['source'] = response['query']['source']['id']
        except:
            pass

        del response['client']
        response['id'] = "graph_" + str(self.id)

        return response
예제 #5
0
 def getTemplate(cls):
     empty = cls(
         id='create',
         type='line',
         name=random.choice(defaultGraphNames),
         data=Data(),
         grid=Grid(),
         crossHair=CrossHair(),
         legend=Legend(),
         tooltips=Tooltips(),
         query=Query(),
         incrementSelector=IncrementSelector(),
         rangeSelector=RangeSelector(),
         limits=[],
         exportData=ExportData(),
     )
     empty = getDict(empty)
     del empty['client']
     return empty
예제 #6
0
 def toDict(self):
     return getDict(self)
예제 #7
0
 def dict(self):
     return getDict(self)