예제 #1
0
    def __init__(self, ref, parent):
        CustomResource.__init__(self, ref, parent)
        self.type_ = parent.type_
        self.itemID = ref
        self.viewTable = parent.viewTable

        self.item = self.session.query(self.models.get(self.type_)).get(ref)
예제 #2
0
 def __init__(self, ref, parent):
     CustomResource.__init__(self, ref, parent)
     try:
         id_ = int(ref)
         self.objectDB = self.session.query(FieldworkArea).get(id_)
     except:
         return 'reference not found'
예제 #3
0
 def __init__(self, ref, parent):
     CustomResource.__init__(self, ref, parent)
     self.type_ = parent.type_
     self.sessionID = ref
     if ref == '0':
         self.sessionID = None
     self.viewTable = parent.viewTable
예제 #4
0
 def __init__(self, ref, parent):
     CustomResource.__init__(self, ref, parent)
     try:
         self.session = self.request.registry.dbmakerExport
     except:
         ''' occures when DB export is not loaded, see development.ini :: loadDBExport '''
         pass
예제 #5
0
    def __init__(self, ref, parent):
        CustomResource.__init__(self, ref, parent)
        self.type_ = ref
        self.viewTable = viewDict[ref]

        self.queryType = {
            'gsm': self.queryWithIndiv,
            'argos': self.queryWithIndiv,
            'rfid': self.queryWithSite,
            'camtrap': self.queryWithSite
        }
 def __init__(self, ref, parent):
     CustomResource.__init__(self, ref, parent)
     print(ref)
     self.objectDB = self.session.query(fieldActivity).get(ref)
예제 #7
0
 def __init__(self, ref, parent):
     CustomResource.__init__(self, ref, parent)
     self.type_ = parent.type_
     self.viewTable = parent.viewTable