Пример #1
0
    def field(self, _context, id, type,
              label='', choices=[], choicesList=None, description='',
              tip='', validator=None, persist=False,
              canonical=''):
        if label == '':
            label = id

        self.fields.append(
            metadatafield(type)(id, label, choices=(choicesList or choices),
                                description=description, tip=tip,
                                validator=validator, persist=persist,
                                canonical=canonical)
            )