Example #1
0
 def __init__(self, title = '', name = '', clas = '', enginename = '', fields = []):
     """
     A initialize method.
     """
     self.title = title
     self.name = name
     self.desc = ''
     self.clas = clas
     self.enginename = enginename
     BaseField.__init__(self)
     FieldHolder.__init__(self, fields)
Example #2
0
 def schema(self):
     if not self._schema:
         self._schema = self._connection.schema.names
         del self._connection
     for field in self._schema:
         self._fields[field] = BaseField(field, self)
     return self._schema
Example #3
0
 def __init__(self, title = '', name = '', clas = 'flat',
              enginename = '', fields = [], innerfields = []):
     """
     A initialize method.
     """
     self.required = False
     self.fields = []
     self.title = title
     self.name = name
     self.desc = ''
     self.clas = clas
     self.enginename = enginename
     BaseField.__init__(self)
     FieldHolder.__init__(self, fields)
     self.innerfields = innerfields
     self.fields = []
     for fs in innerfields:
         for f in fs[1]:
             self.fields.append( (f.get_name(), f) )
Example #4
0
 def __init__(self, title = '', name = '', clas = 'flat',
              enginename = '', fields = [], innerfields = []):
     """
     A initialize method.
     """
     self.required = False
     self.title = title
     self.name = name
     self.desc = ''
     self.clas = clas
     self.enginename = enginename
     BaseField.__init__(self)
     FieldHolder.__init__(self, fields)
     self.innerfields = innerfields
     idx = 0
     for n, t, fs in innerfields:
         for f in fs:
             f.set_name(n+'__'+f.get_name())
             f.set_id(f.get_name()+'_id')
             idx += 1