def __new__(mcs, name, bases, attrs): cls = RecordModelType.__new__(mcs, name, bases, attrs) if 'chid' in attrs: chid = attrs['chid'] assert chid not in control_models control_models[chid] = cls return cls
def __new__(mcs, name, bases, attrs): cls = RecordModelType.__new__(mcs, name, bases, attrs) if 'parent_model_type' in attrs: parent_model_type = attrs['parent_model_type'] assert parent_model_type not in control_data_models control_data_models[parent_model_type] = cls return cls
def __new__(mcs, name, bases, attrs): cls = RecordModelType.__new__(mcs, name, bases, attrs) if 'parent_model_type' in attrs: parent_model_type = attrs['parent_model_type'] before_tablebody = attrs.get('before_tablebody', False) list_type_key = parent_model_type, before_tablebody assert list_type_key not in list_header_models list_header_models[list_type_key] = cls return cls