예제 #1
0
    def create(self, data=None):
        """
        Alternative factory for an IFormEntry object, does not store object.
        Should sign the entry with the schema of the form definition that
        this instance is bound to.

        If data is not None, copy fields from data matching schema fields,
        (note: superclass performs this by calling self._populate_record()).
        """
        form_schema = self._definition_schema()
        data = self._filtered_data(data, schema=form_schema)
        entry = RecordContainer.create(self, data)
        entry.sign(form_schema)
        return entry
예제 #2
0
    def create(self, data=None):
        """
        Alternative factory for an IFormEntry object, does not store object.
        Should sign the entry with the schema of the form definition that
        this instance is bound to.

        If data is not None, copy fields from data matching schema fields,
        (note: superclass performs this by calling self._populate_record()).
        """
        form_schema = self._definition_schema()
        data = self._filtered_data(data, schema=form_schema)
        entry = RecordContainer.create(self, data)
        entry.sign(form_schema)
        return entry
예제 #3
0
 def __len__(self):
     return RecordContainer.__len__(self)
예제 #4
0
 def __init__(self, id=None, **kwargs):
     Item.__init__(self, id, **kwargs)
     self._metadata = PersistentDict()
     RecordContainer.__init__(self, factory=FormEntry)
예제 #5
0
 def __len__(self):
     return RecordContainer.__len__(self)
예제 #6
0
 def __init__(self, id=None, **kwargs):
     Item.__init__(self, id, **kwargs)
     self._metadata = PersistentDict()
     RecordContainer.__init__(self, factory=FormEntry)