def _group_schemas(self): result = [] for name in self.components.names: group = self.components.groups[name] schema = group.schema if group.group_usage == u'grid': schema = grid_wrapper_schema(schema) result.append((name, schema)) return result
def sync_simple_form(form, components): """ Sync form data storage objects with schema of form definition components. """ for name in components.names: group = components.groups[name] schema = group.schema if group.group_usage == u'grid': schema = grid_wrapper_schema(group.schema) if name not in form.data: form.data[name] = FormEntry() # add new form.data[name].sign(schema) history_log(form, 'Schema updated for form entries.')